diff --git a/servers/wstream.py b/servers/wstream.py index 83ce24f3..5e44cc47 100644 --- a/servers/wstream.py +++ b/servers/wstream.py @@ -80,6 +80,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= key['type'] = 'mp4' if not 'src' in key and 'file' in key: key['src'] = key['file'] + if '?' in key['src']: key['src'] = key['src'].split('?')[0] video_urls.append(['%s [%s]' % (key['type'].replace('video/', ''), key['label']), key['src'].replace('https', 'http') + '|' + _headers]) elif type(key) != dict: filetype = key.split('.')[-1] @@ -87,6 +88,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= video_urls.append([filetype, key.replace('https', 'http') + '|' + _headers]) else: if not 'src' in key and 'file' in key: key['src'] = key['file'] + if '?' in key['src']: key['src'] = key['src'].split('?')[0] if key['src'].split('.')[-1] == 'mpd': pass video_urls.append([key['src'].split('.')[-1], key['src'].replace('https', 'http') + '|' + _headers]) except: diff --git a/specials/downloads.py b/specials/downloads.py index fc6ec34f..6ff6b739 100644 --- a/specials/downloads.py +++ b/specials/downloads.py @@ -578,7 +578,7 @@ def sort_method(item): def download_from_url(url, item): info("Attempting to download:", url) - if url.lower().split('|')[0].endswith(".m3u8") or url.lower().startswith("rtmp"): + if '.m3u8' in url.lower().split('|')[0] or url.lower().startswith("rtmp"): save_server_statistics(item.server, 0, False) platformtools.dialog_notification('m3u8 Download',config.get_localized_string(60364), sound=False) return {"downloadStatus": STATUS_CODES.error}