Fix alternativo a redirect

This commit is contained in:
marco
2022-05-04 21:11:41 +02:00
parent 277701c90c
commit 17f103aebd
4 changed files with 19 additions and 15 deletions

View File

@@ -110,7 +110,7 @@ def get_videolibrary_support():
def get_channel_url(findhostMethod=None, name=None, forceFindhost=False):
from core import jsontools, httptools
from core import jsontools
import inspect
LOCAL_FILE = os.path.join(get_runtime_path(), "channels.json")
@@ -129,9 +129,7 @@ def get_channel_url(findhostMethod=None, name=None, forceFindhost=False):
jsontools.update_node(url, name, 'url')
return url
else:
url = httptools.downloadpage(channels_data['direct'][name], follow_redirects=True, only_headers=True).url
if url.endswith('/'): url = url[:-1]
return url
return channels_data['direct'][name]
def get_system_platform():