From bb4ccff33995b82284c2ada524096dc60d1309f1 Mon Sep 17 00:00:00 2001 From: mac12m99 <10120390+mac12m99@users.noreply.github.com> Date: Fri, 14 May 2021 18:00:08 +0200 Subject: [PATCH] Fix grafico "cerca negli altri canali" --- specials/globalsearch.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/specials/globalsearch.py b/specials/globalsearch.py index 8d156f3f..fce4723b 100644 --- a/specials/globalsearch.py +++ b/specials/globalsearch.py @@ -300,10 +300,12 @@ class SearchWindow(xbmcgui.WindowXML): return channels_list def timer(self): - while self.searchActions: + while self.searchActions or self.thActions.is_alive(): if self.exit: return - percent = (float(self.count) / len(self.searchActions)) * 100 - self.LOADING.setVisible(False) + try: + percent = (float(self.count) / len(self.searchActions)) * 100 + except ZeroDivisionError: + percent = 0 self.PROGRESS.setPercent(percent) self.COUNT.setText('%s/%s [%s"]' % (self.count, len(self.searchActions), int(time.time() - self.time))) if percent == 100: @@ -408,6 +410,7 @@ class SearchWindow(xbmcgui.WindowXML): return it def update(self, channel, valid, results): + self.LOADING.setVisible(False) if self.exit: return logger.debug('Search on channel', channel)