From c563b0e0896a64c41c255040b229ec5067cf04e7 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Wed, 23 Dec 2020 19:17:43 +0100 Subject: [PATCH] Fix Ricerca Raiplay --- channels/raiplay.py | 5 +++-- specials/globalsearch.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/channels/raiplay.py b/channels/raiplay.py index 22eb9b87..e1b5bf8a 100644 --- a/channels/raiplay.py +++ b/channels/raiplay.py @@ -5,7 +5,7 @@ import requests, sys, inspect from core import support -from platformcode import autorenumber +from platformcode import autorenumber, logger if sys.version_info[0] >= 3: from concurrent import futures else: @@ -129,7 +129,7 @@ def search(item, text): for key in json: for key in json[key]: if 'PathID' in key and (text.lower() in key['name'].lower()): - itemlist.append(item.clone(title = support.typo(key['name'],'bold'), fulltitle = key['name'], show = key['name'], url = getUrl(key['PathID']), action = 'Type', + itemlist.append(item.clone(title = support.typo(key['name'],'bold'), fulltitle = key['name'], show = key['name'], url = key['PathID'].replace('/?json', '.json'), action = 'Type', thumbnail = getUrl(key['images']['portrait'] if 'portrait' in key['images'] else key['images']['portrait43'] if 'portrait43' in key['images'] else key['images']['landscape']), fanart = getUrl(key['images']['landscape'] if 'landscape' in key['images'] else key['images']['landscape43']))) except: @@ -141,6 +141,7 @@ def search(item, text): def Type(item): + logger.debug(item.url) json = current_session.get(item.url).json() if json['program_info']['layout'] == 'single': item.contentTitle = item.fulltitle diff --git a/specials/globalsearch.py b/specials/globalsearch.py index a7e46381..cdfd66d6 100644 --- a/specials/globalsearch.py +++ b/specials/globalsearch.py @@ -594,7 +594,7 @@ class SearchWindow(xbmcgui.WindowXMLDialog): busy(False) return - if item.action not in ['findvideos', 'episodios']: # special items (add to videolibrary, download ecc.) + if item.action in ['add_pelicula_to_library', 'add_serie_to_library','save_download']: # special items (add to videolibrary, download ecc.) xbmc.executebuiltin("RunPlugin(plugin://plugin.video.kod/?" + item_url + ")") busy(False) return @@ -742,9 +742,9 @@ class SearchWindow(xbmcgui.WindowXMLDialog): def playmonitor(self, server=None): if server: + platformtools.prevent_busy(server) server.window = True server.globalsearch = True - platformtools.prevent_busy(server) Thread(target=run, args=[server]).start() # run(server) try: