From b31b5825c2c3f2266069cb8ae6fe098453999aba Mon Sep 17 00:00:00 2001 From: Kingul Date: Wed, 23 Nov 2016 13:50:34 +0200 Subject: [PATCH 1/2] Kodi 17 open context menu when is default for onclick torrent --- Core.py | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/Core.py b/Core.py index a984193..c996b67 100644 --- a/Core.py +++ b/Core.py @@ -1693,8 +1693,28 @@ class Core: xbmcplugin.endOfDirectory(handle=int(sys.argv[1]), succeeded=True) def context(self, params={}): - xbmc.executebuiltin("Action(ContextMenu)") - sys.exit() + if int(self.version_check()[:2]) < 17: + xbmc.executebuiltin("Action(ContextMenu)") + sys.exit() + else: + fixed = xbmcgui.Dialog().contextmenu(list=[(self.localize('Open')), + (self.localize('Download via Libtorrent')), + (self.localize('Download via T-client'))]) + if fixed == 0: + xbmc.executebuiltin('XBMC.Container.Update(%s)' % + ('%s?action=%s&url=%s') % + (sys.argv[0], 'openTorrent', params['url'])) + elif fixed == 1: + xbmc.executebuiltin('XBMC.RunPlugin(%s)' % + ('%s?action=%s&url=%s') % + (sys.argv[0], 'downloadLibtorrent', params['url'])) + elif fixed == 2: + xbmc.executebuiltin('XBMC.RunPlugin(%s)' % + ('%s?action=%s&url=%s') % + (sys.argv[0], 'downloadFilesList', params['url'])) + + def version_check(self): + return xbmc.getInfoLabel( "System.BuildVersion" ) def downloadFilesList(self, params={}): from resources.utorrent.net import Download From 95bc776895e8e48962171a632d78c27a2774d480 Mon Sep 17 00:00:00 2001 From: Kingul Date: Wed, 23 Nov 2016 20:13:05 +0200 Subject: [PATCH 2/2] fix kickass contenter movie thumb --- resources/contenters/KickAssSo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/contenters/KickAssSo.py b/resources/contenters/KickAssSo.py index 36df64d..3867011 100644 --- a/resources/contenters/KickAssSo.py +++ b/resources/contenters/KickAssSo.py @@ -143,7 +143,7 @@ class KickAssSo(Content.Content): 'kinopoisk': ''} try: img = result.find('a', {'class': 'movieCover'}).find('img').get('src') - movieInfo['poster'] = 'http:' + img + movieInfo['poster'] = img if img.startswith('http:') else 'http:' + img except: pass try: