From ff7e3a3fc021daf2f2d5a05475a38ba6e9ac82e5 Mon Sep 17 00:00:00 2001 From: marco Date: Wed, 20 Nov 2019 13:12:14 +0100 Subject: [PATCH 1/5] Revert "test processi in ricerca globale" This reverts commit 3f32c572 --- specials/search.py | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/specials/search.py b/specials/search.py index 0aa20fc9..d90dd664 100644 --- a/specials/search.py +++ b/specials/search.py @@ -18,8 +18,7 @@ from platformcode import config, logger from platformcode import platformtools from core.support import typo import cPickle, shutil -from multiprocessing import Process -multi = 'process' +global_lock = threading.Lock() addon = xbmcaddon.Addon('metadata.themoviedb.org') def_lang = addon.getSetting('language') @@ -574,15 +573,10 @@ def do_search(item, categories=None): logger.info("Búsqueda cancelada") return itemlist if multithread: - if multi == 'threads': - t = Thread(target=channel_search, args=[search_results, channel_parameters, tecleado], - name=channel_parameters["title"]) - t.setDaemon(True) - t.start() - else: - t = Process(target=channel_search, args=[search_results, channel_parameters, tecleado], - name=channel_parameters["title"]) - t.start() + t = Thread(target=channel_search, args=[search_results, channel_parameters, tecleado], + name=channel_parameters["title"]) + t.setDaemon(True) + t.start() threads.append(t) # Modo single Thread else: @@ -612,26 +606,19 @@ def search_progress(threads): import math progreso = platformtools.dialog_progress_bg(config.get_localized_string(20000), "") - if multi == 'threads': - pendent = [a for a in threads if a.isAlive()] - else: - pendent = [a for a in threads if a.is_alive()] - + pendent = [a for a in threads if a.isAlive()] if len(pendent) > 0: t = float(100) / len(pendent) while len(pendent) > 0: index = (len(threads) - len(pendent)) + 1 percentage = int(math.ceil(index * t)) - list_pendent_names = ['test' for a in pendent] + list_pendent_names = [a.getName() for a in pendent] mensaje = config.get_localized_string(70282) % (", ".join(list_pendent_names)) progreso.update(percentage, config.get_localized_string(60521) % (len(threads) - len(pendent) + 1, len(threads)), mensaje) time.sleep(0.5) - if multi == 'threads': - pendent = [a for a in threads if a.isAlive()] - else: - pendent = [a for a in threads if a.is_alive()] + pendent = [a for a in threads if a.isAlive()] progreso.close() with open(os.path.join(res_dir, 'done'), 'w') as f: f.write('1') From 55fd3b7812ddc49213ad8e0dc715e236077ee8d2 Mon Sep 17 00:00:00 2001 From: mac12m99 Date: Wed, 20 Nov 2019 19:53:27 +0100 Subject: [PATCH 2/5] lingua all se non riconosciuta --- channelselector.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/channelselector.py b/channelselector.py index e79b3e0b..d7d0c4bd 100644 --- a/channelselector.py +++ b/channelselector.py @@ -318,12 +318,16 @@ def set_channel_info(parameters): def auto_filter(auto_lang=False): + list_lang = ['ita', 'vos', 'sub-ita'] if config.get_setting("channel_language") == 'auto' or auto_lang == True: lang = config.get_localized_string(20001) else: lang = config.get_setting("channel_language", default="all") + if lang not in list_lang: + lang = 'all' + return lang # import xbmc, xbmcaddon From 6699e56b96b047658f9d42a4f85287a483af4ce7 Mon Sep 17 00:00:00 2001 From: mac12m99 Date: Wed, 20 Nov 2019 20:11:25 +0100 Subject: [PATCH 3/5] nuova regex wstream --- servers/wstream.json | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/servers/wstream.json b/servers/wstream.json index 97e73570..e7c613a2 100644 --- a/servers/wstream.json +++ b/servers/wstream.json @@ -7,27 +7,11 @@ "find_videos": { "patterns": [ { - "pattern": "https://wstream.video/stream/switch_embed.php\\?file_code=([a-z0-9A-Z]+)", - "url": "https://wstream.video/video.php?file_code=\\1" - }, - { - "pattern":"wstream.video\/api\/vcmod\/fastredirect\/streaming.php\\?id=([0-9a-zA-Z]+)", - "url": "https://wstream.video/api/vcmod/fastredirect/streaming.php?id=\\1" - }, - { - "pattern": "wstream\\.video/video\\.php\\?file_code=([a-z0-9A-Z]+)", - "url": "https://wstream.video/video.php?file_code=\\1" - }, - { - "pattern": "wstream\\.video\/(?:embed-|videos/|video/|videow/|videoj/)([a-z0-9A-Z]+)", - "url": "https://wstream.video/video.php?file_code=\\1" - }, - { - "pattern": "wstream\\.video/(?!api/|stream/|embed-)([a-z0-9A-Z]+)", + "pattern": "wstream\\.video/?.*?(? Date: Wed, 20 Nov 2019 20:34:43 +0100 Subject: [PATCH 4/5] ops --- servers/wstream.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/wstream.json b/servers/wstream.json index e7c613a2..63e99522 100644 --- a/servers/wstream.json +++ b/servers/wstream.json @@ -7,7 +7,7 @@ "find_videos": { "patterns": [ { - "pattern": "wstream\\.video/?.*?(? Date: Wed, 20 Nov 2019 22:39:56 +0100 Subject: [PATCH 5/5] Fix Wstream --- servers/wstream.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/wstream.json b/servers/wstream.json index 63e99522..d1b8645b 100644 --- a/servers/wstream.json +++ b/servers/wstream.json @@ -7,7 +7,7 @@ "find_videos": { "patterns": [ { - "pattern": "wstream\\.video/?.*?(?