From 53cc111e7488737493bd0ed37775d40e6af24131 Mon Sep 17 00:00:00 2001 From: cttynul Date: Thu, 13 Jun 2019 10:39:57 +0200 Subject: [PATCH] fix debriders --- core/channeltools.py | 2 ++ specials/filmontv.py | 2 +- specials/setting.py | 11 ++++++----- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/core/channeltools.py b/core/channeltools.py index db25ce37..17c42b8f 100644 --- a/core/channeltools.py +++ b/core/channeltools.py @@ -136,6 +136,8 @@ def get_channel_json(channel_name): channel_path = filetools.join(config.get_runtime_path(), "specials", channel_name + ".json") if not os.path.isfile(channel_path): channel_path = filetools.join(config.get_runtime_path(), "servers", channel_name + ".json") + if not os.path.isfile(channel_path): + channel_path = filetools.join(config.get_runtime_path(), "servers", "debriders", channel_name + ".json") if filetools.isfile(channel_path): # logger.info("channel_data=" + channel_path) channel_json = jsontools.load(filetools.read(channel_path)) diff --git a/specials/filmontv.py b/specials/filmontv.py index 99578755..d8cac7b7 100644 --- a/specials/filmontv.py +++ b/specials/filmontv.py @@ -82,7 +82,7 @@ def now_on_misc(item): # Carica la pagina data = httptools.downloadpage(item.url).data #patron = r'spanTitleMovie">([A-Za-z À-ÖØ-öø-ÿ\-\']*)[a-z \n<>\/="_\-:0-9;A-Z.]*GenresMovie">([\-\'A-Za-z À-ÖØ-öø-ÿ\/]*)[a-z \n<>\/="_\-:0-9;A-Z.%]*src="([a-zA-Z:\/\.0-9?]*)[a-z \n<>\/="_\-:0-9;A-Z.%\-\']*Year">([A-Z 0-9a-z]*)' - patron = r'table-cell[;" ]*alt="([a-zA-Z 0-9\+,\.]*)"[a-z \n<>\/="_\-:0-9;A-Z.?!\'\&, \(\)#]*backdrop" alt="([A-Za-z: ,0-9\.À-ÖØ-öø-ÿ\&\#\-\']*)"[ ]*src="([A-Za-z: ,0-9\.À-ÖØ-öø-ÿ\/?=\-\']*)' + patron = r'table-cell[;" ]*alt="([^"]+)"[a-z \n<>\/="_\-:0-9;A-Z.?!\'\&, \(\)#]*backdrop" alt="([^"]+)"[ ]*src="([^"]+)' matches = re.compile(patron, re.DOTALL).findall(data) for scrapedchannel, scrapedtitle, scrapedthumbnail in matches: # for scrapedthumbnail, scrapedtitle, scrapedtv in matches: diff --git a/specials/setting.py b/specials/setting.py index db2a338f..ba3cb11b 100644 --- a/specials/setting.py +++ b/specials/setting.py @@ -85,8 +85,7 @@ def menu_channels(item): def channel_config(item): - return platformtools.show_channel_settings(channelpath=filetools.join(config.get_runtime_path(), "channels", - item.config)) + return platformtools.show_channel_settings(channelpath=filetools.join(config.get_runtime_path(), "channels", item.config)) def autostart(item): # item necessario launcher.py linea 265 @@ -145,7 +144,7 @@ def menu_servers(item): if server_parameters["has_settings"]: itemlist.append( Item(channel=CHANNELNAME, title = ". " + config.get_localized_string(60553) % server_parameters["name"], - action="server_config", config=server, folder=False, thumbnail="")) + action="server_debrid_config", config=server, folder=False, thumbnail="")) itemlist.append(Item(channel=CHANNELNAME, title=config.get_localized_string(60554), action="", folder=False, text_bold = True, thumbnail=get_thumb("setting_0.png"))) @@ -167,8 +166,10 @@ def menu_servers(item): def server_config(item): - return platformtools.show_channel_settings(channelpath=filetools.join(config.get_runtime_path(), "servers", - item.config)) + return platformtools.show_channel_settings(channelpath=filetools.join(config.get_runtime_path(), "servers", item.config)) + +def server_debrid_config(item): + return platformtools.show_channel_settings(channelpath=filetools.join(config.get_runtime_path(), "servers", "debriders", item.config)) def servers_blacklist(item):