titlemake

pull/15/head
DiMartinoXBMC 2016-11-29 21:47:17 +03:00
parent 9cfc007a29
commit ec149abdc6
4 changed files with 35 additions and 14 deletions

12
Core.py
View File

@ -38,6 +38,7 @@ class Core:
open_option = int(__settings__.getSetting('open_option'))
language = {0: 'en', 1: 'ru', 2: 'uk', 3: 'he', 4: 'hu'}.get(int(__settings__.getSetting("language")))
scrapperDB_ver = {'en':'1.1', 'ru':'1.3', 'he':'1.3'}
torrent_info_style = int(__settings__.getSetting('torrent_info_style'))
log('SYS ARGV: ' + str(sys.argv))
@ -1851,9 +1852,20 @@ class Core:
clRed = '[COLOR FFFF0000]%s[/COLOR]'
title = title.replace('720p', '[B]720p[/B]').replace('1080p', '[B]1080p[/B]')
if self.torrent_info_style == 0:
title = clWhite % title
second = '[I](%s) [S/L: %d/%d] [/I]' % (size, seeds, leechers)
title += ' ' + second
elif self.torrent_info_style == 1:
title = clWhite % title
second = '[I](%s) [S/L: %d/%d] [/I]' % (size, seeds, leechers)
title = second + ' ' + title
elif self.torrent_info_style == 2:
title = clWhite % title
second = '[I](%s) [S/L: %d/%d] [/I]' % (size, seeds, leechers)
title += '\r\n' + clDimgray % second
return title
def search(self, params={}):

View File

@ -69,6 +69,10 @@
<string id="30069">Append size to file name</string>
<string id="30070">Enable DHT</string>
<string id="30071">Estuary (by DiMartino)</string>
<string id="30072">Стиль информации о раздаче</string>
<string id="30073">In the end</string>
<string id="30074">In the beginning</string>
<string id="30075">Second string</string>
<string id="30101">Interface</string>
<string id="30102">P2P Network</string>
<string id="30103">Advanced</string>

View File

@ -68,7 +68,11 @@
<string id="30068">pyrrent2http (python-libtorrent по http)</string>
<string id="30069">Добавлять размер к имени файла</string>
<string id="30070">Включить DHT</string>
<string id="30018">Estuary (от DiMartino)</string>
<string id="30071">Estuary (от DiMartino)</string>
<string id="30072">Стиль информации о раздаче</string>
<string id="30073">В конце</string>
<string id="30074">В начале</string>
<string id="30075">Второй строкой</string>
<string id="30101">Интерфейс</string>
<string id="30102">P2P Сеть</string>
<string id="30103">Дополнительные</string>

View File

@ -71,5 +71,6 @@
<setting id="max_history_add" type="slider" label="30065" default="100" visible="!eq(-7,1)" range="0,2,100" option="int"/>
<setting id="enable_dht" type="bool" label="30070" default="true" visible="!eq(-8,1)"/>
<setting id="append_filesize" type="bool" label="30069" default="true"/>
<setting id="torrent_info_style" type="enum" label="30072" default="0" lvalues="30073|30074|30075"/>
</category>
</settings>