From 4e498f667482cb84c625d2ab707e221c3446cbf2 Mon Sep 17 00:00:00 2001 From: mac12m99 Date: Sat, 8 Jun 2019 12:01:34 +0200 Subject: [PATCH] enable personalized url --- platformcode/config.py | 13 ++++++++++--- resources/settings.xml | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/platformcode/config.py b/platformcode/config.py index ff8bf758..0cb811c5 100644 --- a/platformcode/config.py +++ b/platformcode/config.py @@ -85,9 +85,7 @@ def get_videolibrary_support(): return True def get_channel_url(name): - if __settings__.getSetting("use_custom_url") == "true": - return get_setting("channel_host", name) - else: + def json(): try: try: import json @@ -104,6 +102,15 @@ def get_channel_url(name): except: return get_setting("channel_host", name) + if __settings__.getSetting("use_custom_url") == "true": + host = get_setting("channel_host", name) + if host: + return host + else: + return json() + else: + return json() + def get_system_platform(): """ fonction: pour recuperer la platform que xbmc tourne """ platform = "unknown" diff --git a/resources/settings.xml b/resources/settings.xml index 2ea2da53..9a2af2b6 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -10,7 +10,7 @@ - +