Merge pull request #60 from viorel-m/master

Fix for open(no return)
pull/15/head
DiMartinoXBMC 2016-11-21 22:14:26 +03:00 committed by GitHub
commit 975357c3ec
3 changed files with 17 additions and 20 deletions

25
Core.py
View File

@ -1148,14 +1148,14 @@ class Core:
contextMenu = [(self.localize('Search Control Window'),
'xbmc.RunScript(%s,)' % os.path.join(ROOT, 'controlcenter.py'))]
replaceMenu = False
if contextMenu:
listitem.addContextMenuItems(contextMenu, replaceItems=replaceMenu)
if isFolder:
listitem.setProperty("Folder", "true")
listitem.setInfo(type='Video', infoLabels=info)
else:
listitem.setInfo(type='Video', infoLabels=info)
listitem.setArt({'thumb': image})
if contextMenu:
listitem.addContextMenuItems(contextMenu, replaceItems=replaceMenu)
xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=url, listitem=listitem, isFolder=isFolder)
def getParameters(self, parameterString):
@ -1615,8 +1615,8 @@ class Core:
(self.localize('Download via Libtorrent'),
'XBMC.RunPlugin(%s)' % ('%s?action=%s&url=%s') % (
sys.argv[0], 'downloadLibtorrent', urllib.quote_plus(link))),
(self.localize('Open (no return)'),
'XBMC.ActivateWindow(Videos,%s)' % ('%s?action=%s%s') % (
(self.localize('Open'),
'XBMC.Container.Update(%s)' % ('%s?action=%s%s') % (
sys.argv[0], 'openTorrent', link_url)),
]
title = self.titleMake(seeds, leechers, size, title)
@ -1676,8 +1676,8 @@ class Core:
(self.localize('Add to %s') % return_name,
'XBMC.RunPlugin(%s)' % (back_url+'&stringdata=' + urllib.quote_plus(
json.dumps(sdata)))),
(self.localize('Open (no return)'),
'XBMC.ActivateWindow(Videos,%s)' % ('%s?action=%s%s') % (
(self.localize('Open'),
'XBMC.Container.Update(%s)' % ('%s?action=%s%s') % (
sys.argv[0], 'openTorrent', link_url)),
(self.localize('Return to %s') % return_name,
'XBMC.ActivateWindow(%s)' % ('Videos,%s' % return_url)),
@ -1694,7 +1694,7 @@ class Core:
def context(self, params={}):
xbmc.executebuiltin("Action(ContextMenu)")
return
sys.exit()
def downloadFilesList(self, params={}):
from resources.utorrent.net import Download
@ -1815,13 +1815,10 @@ class Core:
clAliceblue = '[COLOR FFF0F8FF]%s[/COLOR]'
clRed = '[COLOR FFFF0000]%s[/COLOR]'
title = title.replace('720p', '[B]720p[/B]')
title = clWhite % title + chr(10)
second = '[I](%s) [S/L: %d/%d] [/I]' % (size, seeds, leechers) + chr(10)
space = ''
for i in range(0, 180 - len(second)):
space += ' '
title += space + second
title = title.replace('720p', '[B]720p[/B]').replace('1080p', '[B]1080p[/B]')
title = clWhite % title
second = '[I](%s) [S/L: %d/%d] [/I]' % (size, seeds, leechers)
title += ' ' + second
return title
def search(self, params={}):

View File

@ -224,7 +224,7 @@ def localize(text):
'Unpause':'Des-pausar',
'Pause':'Pausar',
'Delete':'Eliminar',
'Open (no return)':'Abrir (sin retorno)',
'Open':'Abrir',
'Torrent is seeding. To stop it use Download Status.':'El toorrent esta siendo compartido. Para detenerlo, utiliza el dialogo de descarga.',
'Start All':'Iniciar Todo',
'Started All!':'Todo ha sido iniciado',
@ -483,7 +483,7 @@ def localize(text):
'Unpause':'אל תפסיק',
'Pause':'הפסק',
'Delete':'מחק',
'Open (no return)':'פתח',
'Open':'פתח',
'Torrent is seeding. To stop it use Download Status.':'Torrent is seeding. To stop it use Download Status.',
'Start All':'התחל הכל',
'Started All!':'מיין הכל',
@ -742,7 +742,7 @@ def localize(text):
'Unpause':'Újra elindít',
'Pause':'Szüneteltet',
'Delete':'Eltávolít',
'Open (no return)':'Megnyitás (no return)',
'Open':'Megnyitás',
'Torrent is seeding. To stop it use Download Status.':'Torrent seedelés alatt. Ahhoz, hogy megállítsd használd a Letöltési Állapotot.',
'Start All':'Összes elindítása',
'Started All!':'Összes elindítva!',
@ -1001,7 +1001,7 @@ def localize(text):
'Unpause':'Возобновить',
'Pause':'Пауза',
'Delete':'Удалить',
'Open (no return)':'Открыть (без возврата)',
'Open':'Открыть',
'Torrent is seeding. To stop it use Download Status.':'Сидирование. Для остановки используйте Статус Загрузки.',
'Start All':'Запустить Все',
'Started All!':'Все Запущены!',
@ -1259,7 +1259,7 @@ def localize(text):
'Unpause':'Відновити',
'Pause':'Пауза',
'Delete':'Видалити',
'Open (no return)':'Відкрити (без повернення)',
'Open':'Відкрити',
'Torrent is seeding. To stop it use Download Status.':'Сідування. Для зупинки використовуйте Статус завантаження.',
'Start All':'Запустити все',
'Started All!':'Все запущене!',

View File

@ -332,7 +332,7 @@ class SkorbaLoader:
iterator = int(s.progress * 100)
info['progress'] = iterator
db.update(title, info)
self.debug()
#self.debug()
self.session.remove_torrent(self.torrentHandle)
return