+ [EXPERIMENTAL] function to choose if using custom or not urls channel
This commit is contained in:
@@ -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 """
|
||||
|
||||
@@ -5514,4 +5514,8 @@ msgstr ""
|
||||
|
||||
msgctxt "#70704"
|
||||
msgid "TMDB ID (0 to cancel)"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#70705"
|
||||
msgid "Use your custom channel URLs"
|
||||
msgstr ""
|
||||
@@ -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)"
|
||||
msgstr "TMDB ID (0 per annullare)"
|
||||
|
||||
msgctxt "#70705"
|
||||
msgid "Use your custom channel URLs"
|
||||
msgstr "Utilizza URL personalizzati per i canali"
|
||||
@@ -10,6 +10,7 @@
|
||||
<setting id="channel_language" type="labelenum" values="auto|all|ita" label="30019" default="auto"/>
|
||||
<setting id="trakt_sync" type="bool" label="70109" default="false"/>
|
||||
<setting id="forceview" type="bool" label="30043" default="false"/>
|
||||
<setting id="use_custom_url" type="bool" label="70705" default="false" enable="false"/>
|
||||
<setting id="faster_item_serialization" type="bool" label="30300" default="false"/>
|
||||
<setting id="debug" type="bool" label="30003" default="false"/>
|
||||
<setting label="70169" type="lsep"/>
|
||||
|
||||
Reference in New Issue
Block a user