eliminati custom url

This commit is contained in:
mac12m99
2019-10-26 11:26:39 +02:00
committed by marco
parent 614a54e204
commit 5340c588cb
2 changed files with 9 additions and 26 deletions

View File

@@ -94,31 +94,15 @@ def get_videolibrary_support():
return True
def get_channel_url(name):
def json():
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)
if __settings__.getSetting("use_custom_url") == "true":
host = get_setting("channel_host", name)
if host:
return host
else:
return json()
else:
return json()
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)
return data[name]
def get_system_platform():
""" fonction: pour recuperer la platform que xbmc tourne """