diff --git a/platformcode/config.py b/platformcode/config.py index 9adcddd2..10a6e8d4 100644 --- a/platformcode/config.py +++ b/platformcode/config.py @@ -83,21 +83,24 @@ def get_videolibrary_support(): return True def get_channel_url(name): - try: - try: - import json - except: - import simplejson as json - ROOT_DIR = xbmc.translatePath(__settings__.getAddonInfo('Path')) - LOCAL_FILE = os.path.join(ROOT_DIR, "channels.json") - with open(LOCAL_FILE) as f: - data = json.load(f) - if data[name] is not None: - return data[name] - else: - return get_setting("channel_host", name) - except: + if __settings__.getSetting("use_custom_url"): return get_setting("channel_host", name) + else: + try: + try: + import json + except: + import simplejson as json + ROOT_DIR = xbmc.translatePath(__settings__.getAddonInfo('Path')) + LOCAL_FILE = os.path.join(ROOT_DIR, "channels.json") + with open(LOCAL_FILE) as f: + data = json.load(f) + if data[name] is not None: + return data[name] + else: + return get_setting("channel_host", name) + except: + return get_setting("channel_host", name) def get_system_platform(): """ fonction: pour recuperer la platform que xbmc tourne """ diff --git a/resources/language/English/strings.po b/resources/language/English/strings.po index 7886c8c6..ac92b2ff 100644 --- a/resources/language/English/strings.po +++ b/resources/language/English/strings.po @@ -5514,4 +5514,8 @@ msgstr "" msgctxt "#70704" msgid "TMDB ID (0 to cancel)" +msgstr "" + +msgctxt "#70705" +msgid "Use your custom channel URLs" msgstr "" \ No newline at end of file diff --git a/resources/language/Italian/strings.po b/resources/language/Italian/strings.po index 08f4c07c..cac29cd2 100644 --- a/resources/language/Italian/strings.po +++ b/resources/language/Italian/strings.po @@ -5514,4 +5514,8 @@ msgstr "Crea cartelle con le lettere minuscole" msgctxt "#70704" msgid "TMDB ID (0 to cancel)" -msgstr "TMDB ID (0 per annullare)" \ No newline at end of file +msgstr "TMDB ID (0 per annullare)" + +msgctxt "#70705" +msgid "Use your custom channel URLs" +msgstr "Utilizza URL personalizzati per i canali" \ No newline at end of file diff --git a/resources/settings.xml b/resources/settings.xml index 3651121a..2ea2da53 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -10,6 +10,7 @@ +