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

View File

@ -224,7 +224,7 @@ def localize(text):
'Unpause':'Des-pausar', 'Unpause':'Des-pausar',
'Pause':'Pausar', 'Pause':'Pausar',
'Delete':'Eliminar', '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.', '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', 'Start All':'Iniciar Todo',
'Started All!':'Todo ha sido iniciado', 'Started All!':'Todo ha sido iniciado',
@ -483,7 +483,7 @@ def localize(text):
'Unpause':'אל תפסיק', 'Unpause':'אל תפסיק',
'Pause':'הפסק', 'Pause':'הפסק',
'Delete':'מחק', 'Delete':'מחק',
'Open (no return)':'פתח', 'Open':'פתח',
'Torrent is seeding. To stop it use Download Status.':'Torrent is seeding. To stop it use Download Status.', 'Torrent is seeding. To stop it use Download Status.':'Torrent is seeding. To stop it use Download Status.',
'Start All':'התחל הכל', 'Start All':'התחל הכל',
'Started All!':'מיין הכל', 'Started All!':'מיין הכל',
@ -742,7 +742,7 @@ def localize(text):
'Unpause':'Újra elindít', 'Unpause':'Újra elindít',
'Pause':'Szüneteltet', 'Pause':'Szüneteltet',
'Delete':'Eltávolít', '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.', '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', 'Start All':'Összes elindítása',
'Started All!':'Összes elindítva!', 'Started All!':'Összes elindítva!',
@ -1001,7 +1001,7 @@ def localize(text):
'Unpause':'Возобновить', 'Unpause':'Возобновить',
'Pause':'Пауза', 'Pause':'Пауза',
'Delete':'Удалить', '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':'Запустить Все', 'Start All':'Запустить Все',
'Started All!':'Все Запущены!', 'Started All!':'Все Запущены!',
@ -1259,7 +1259,7 @@ def localize(text):
'Unpause':'Відновити', 'Unpause':'Відновити',
'Pause':'Пауза', 'Pause':'Пауза',
'Delete':'Видалити', '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':'Запустити все', 'Start All':'Запустити все',
'Started All!':'Все запущене!', 'Started All!':'Все запущене!',

View File

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