From d6c338e9499f8c333654dd4c8a80ac933f0eb2ee Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Fri, 31 Jul 2020 09:22:25 +0200 Subject: [PATCH] Fix Ricerca in cache --- platformcode/launcher.py | 4 ++-- specials/search.py | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/platformcode/launcher.py b/platformcode/launcher.py index e1e97ed4..36242bee 100644 --- a/platformcode/launcher.py +++ b/platformcode/launcher.py @@ -245,7 +245,7 @@ def run(item=None): # Special action for searching, first asks for the words then call the "search" function elif item.action == "search": # from core.support import dbg;dbg() - if filetools.isfile(temp_search_file): + if filetools.isfile(temp_search_file) and config.get_setting('videolibrary_kodi'): itemlist = [] f = filetools.read(temp_search_file) strList = f.split(',') @@ -356,7 +356,7 @@ def new_search(item, channel=None): return itemlist def set_search_temp(item): - if filetools.isfile(temp_search_file): + if filetools.isfile(temp_search_file) and config.get_setting('videolibrary_kodi'): f = '[V],' + filetools.read(temp_search_file) filetools.write(temp_search_file, f) diff --git a/specials/search.py b/specials/search.py index 164f72e9..821f28f9 100644 --- a/specials/search.py +++ b/specials/search.py @@ -201,8 +201,7 @@ def channel_search(item): searching_titles += channel_titles cnt = 0 - progress = platformtools.dialog_progress(config.get_localized_string(30993) % item.title, config.get_localized_string(70744) % len(channel_list), - ', '.join(searching_titles)) + progress = platformtools.dialog_progress(config.get_localized_string(30993) % item.title, config.get_localized_string(70744) % len(channel_list), ', '.join(searching_titles)) config.set_setting('tmdb_active', False) search_action_list = [] @@ -250,14 +249,12 @@ def channel_search(item): cnt += 1 searching_titles.remove(searching_titles[searching.index(channel)]) searching.remove(channel) - progress.update(old_div(((total_search_actions - len(search_action_list)) * 100), total_search_actions), config.get_localized_string(70744) % str(len(channel_list) - cnt), - ', '.join(searching_titles)) + progress.update(old_div(((total_search_actions - len(search_action_list)) * 100), total_search_actions), config.get_localized_string(70744) % str(len(channel_list) - cnt), ', '.join(searching_titles)) progress.close() cnt = 0 - progress = platformtools.dialog_progress(config.get_localized_string(30993) % item.title, config.get_localized_string(60295), - config.get_localized_string(60293)) + progress = platformtools.dialog_progress(config.get_localized_string(30993) % item.title, config.get_localized_string(60295), config.get_localized_string(60293)) config.set_setting('tmdb_active', True) # res_count = 0