From d57af7d7382fa3f05d1d0e6fa66edf01c7068b14 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Mon, 30 Nov 2020 19:57:41 +0100 Subject: [PATCH] =?UTF-8?q?Ricerca=20Globale=20aggiunta=20possibilit=C3=A0?= =?UTF-8?q?=20di=20scaricare=20singolo=20episodio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platformcode/globalsearch.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/platformcode/globalsearch.py b/platformcode/globalsearch.py index d1797474..b45e63ba 100644 --- a/platformcode/globalsearch.py +++ b/platformcode/globalsearch.py @@ -375,7 +375,7 @@ class SearchWindow(xbmcgui.WindowXML): def onAction(self, action): action = action.getId() focus = self.getFocusId() - if action in [CONTEXT] and focus in [RESULTS]: + if action in [CONTEXT] and focus in [RESULTS, EPISODESLIST, SERVERLIST]: self.context() elif action in [SWIPEUP]: @@ -575,12 +575,19 @@ class SearchWindow(xbmcgui.WindowXML): if item.contentType == 'movie': context += [config.get_localized_string(60353), config.get_localized_string(60354)] context_commands += ["RunPlugin(%s?%s&%s)" % (sys.argv[0], item.tourl(), 'action=add_pelicula_to_library&from_action=' + item.action), - "RunPlugin(%s?%s&%s)" % (sys.argv[0], item.tourl(), 'channel=downloads&action=save_download&from_channel=' + item.channel + '&from_action=' +item.action)] + "RunPlugin(%s?%s&%s)" % (sys.argv[0], item.tourl(), 'channel=downloads&action=save_download&from_channel=' + item.channel + '&from_action=' +item.action)] else: context += [config.get_localized_string(60352), config.get_localized_string(60355), config.get_localized_string(60357)] context_commands += ["RunPlugin(%s?%s&%s)" % (sys.argv[0], item.tourl(), 'action=add_serie_to_library&from_action=' + item.action), - "RunPlugin(%s?%s&%s)" % (sys.argv[0], item.tourl(), 'channel=downloads&action=save_download&from_channel=' + item.channel + '&from_action=' + item.action), - "RunPlugin(%s?%s&%s)" % (sys.argv[0], item.tourl(), 'channel=downloads&action=save_download&download=season&from_channel=' + item.channel +'&from_action=' + item.action)] + "RunPlugin(%s?%s&%s)" % (sys.argv[0], item.tourl(), 'channel=downloads&action=save_download&from_channel=' + item.channel + '&from_action=' + item.action), + "RunPlugin(%s?%s&%s)" % (sys.argv[0], item.tourl(), 'channel=downloads&action=save_download&download=season&from_channel=' + item.channel +'&from_action=' + item.action)] + + if self.EPISODES.isVisible() or self.SERVERS.isVisible(): + pos = self.EPISODESLIST.getSelectedPosition() + item = self.episodes[pos] + context += [config.get_localized_string(60356)] + context_commands += ["RunPlugin(%s?%s&%s)" % (sys.argv[0], item.tourl(), 'channel=downloads&action=save_download&from_channel=' + item.channel + '&from_action=' +item.action)] + index = xbmcgui.Dialog().contextmenu(context) if index > 0: xbmc.executebuiltin(context_commands[index]) \ No newline at end of file