From 2acd82887432de912a0d0ba65227cf455e9b342a Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Mon, 21 Dec 2020 12:20:16 +0100 Subject: [PATCH] Fix Nuova Ricerca globale in caso di Torrent --- platformcode/platformtools.py | 9 ++++----- specials/globalsearch.py | 3 ++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/platformcode/platformtools.py b/platformcode/platformtools.py index dcb817a3..17bfdfbf 100644 --- a/platformcode/platformtools.py +++ b/platformcode/platformtools.py @@ -1110,9 +1110,7 @@ def play_torrent(item, xlistitem, mediaurl): selection = 0 if selection >= 0: - - xbmcplugin.setResolvedUrl(int(sys.argv[1]), False, xlistitem) - time.sleep(1) + prevent_busy(item) mediaurl = urllib.quote_plus(item.url) torr_client = torrent_options[selection][0] @@ -1131,8 +1129,9 @@ def play_torrent(item, xlistitem, mediaurl): torrent.mark_auto_as_watched(item) - while is_playing() and not xbmc.Monitor().abortRequested(): - time.sleep(3) + if not item.globalsearch: + while is_playing() and not xbmc.Monitor().abortRequested(): + time.sleep(3) def resume_playback(played_time): diff --git a/specials/globalsearch.py b/specials/globalsearch.py index b2425bd2..3d9211df 100644 --- a/specials/globalsearch.py +++ b/specials/globalsearch.py @@ -397,7 +397,8 @@ class SearchWindow(xbmcgui.WindowXMLDialog): for result in results: resultsList += result.tourl() + '|' item.setProperty('items',resultsList) - self.channels[int(self.results[name])].setProperty('results', str(len(resultsList).split('|') - 1)) + logger.log(self.channels[int(self.results[name])]) + self.channels[int(self.results[name])].setProperty('results', str(len(resultsList.split('|')) - 1)) pos = self.CHANNELS.getSelectedPosition() self.CHANNELS.reset() self.CHANNELS.addItems(self.channels)