Merge branch 'master' of github.com:kodiondemand/addon
This commit is contained in:
@@ -78,7 +78,7 @@ def episodios(item):
|
||||
if item.data: data = item.data
|
||||
# debug= True
|
||||
title = item.fulltitle
|
||||
patron = r'link-episode">(?:\s*<strong>)?\s*(?P<episode>\d+.\d+(?:.\d+)?)(?:\s*\((?P<lang>[?P<lang>A-Za-z-]+)[^>]+>)?(?:\s*(?P<title>.*?) )[^>]+<\/span>\s*(?P<url>.*?)</div>'
|
||||
patron = r'link-episode">(?:\s*<strong>)?\s*(?P<episode>\d+.\d+(?:.\d+)?)(?:\s*\((?P<lang>[?P<lang>A-Za-z-]+)[^>]+>)?(?:\s*(?P<title>[^-<]+))[^>]+</span>\s*(?P<url>.*?)</div>'
|
||||
def itemHook(item):
|
||||
if 'Episodio' in item.title:
|
||||
item.title = support.re.sub(r'Episodio [0-9.-]+', title, item.title)
|
||||
|
||||
@@ -284,6 +284,6 @@ def play_multi_channel(item, itemlist):
|
||||
def servername(server):
|
||||
from core.servertools import translate_server_name
|
||||
path = filetools.join(config.get_runtime_path(), 'servers', server.lower() + '.json')
|
||||
name = jsontools.load(open(path, "r").read())['name']
|
||||
name = jsontools.load(open(path, "rb").read())['name']
|
||||
if name.startswith('@'): name = config.get_localized_string(int(name.replace('@','')))
|
||||
return translate_server_name(name)
|
||||
@@ -261,6 +261,7 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t
|
||||
infolabels['rating'] = scrapertools.decodeHtmlentities(scraped["rating"])
|
||||
|
||||
episode = ''
|
||||
|
||||
if not group or item.grouped:
|
||||
if scraped['season'] and scraped['episode']:
|
||||
stagione = scraped['season']
|
||||
@@ -277,7 +278,7 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t
|
||||
elif item.season:
|
||||
infolabels['season'] = int(item.season)
|
||||
infolabels['episode'] = int(scrapertools.find_single_match(scraped['episode'], r'(\d+)'))
|
||||
episode = item.season +'x'+ scraped['episode']
|
||||
episode = item.season +'x'+ scraped['episode'].zfill(2)
|
||||
elif item.contentType == 'tvshow' and (scraped['episode'] == '' and scraped['season'] == '' and stagione == ''):
|
||||
item.news = 'season_completed'
|
||||
episode = ''
|
||||
|
||||
@@ -327,8 +327,8 @@ def filter_list(episodelist, action=None, path=None):
|
||||
|
||||
# Make Language List
|
||||
for episode in episodelist:
|
||||
if not episode.contentLanguage: episode.contentLanguage = 'ITA'
|
||||
if type(episode.contentLanguage) == list and episode.contentLanguage not in lang_list:
|
||||
#lang_list = episode.contentLanguage
|
||||
pass
|
||||
else:
|
||||
if episode.contentLanguage and episode.contentLanguage not in lang_list:
|
||||
@@ -338,6 +338,7 @@ def filter_list(episodelist, action=None, path=None):
|
||||
if sub not in sub_list: sub_list.append(sub)
|
||||
else:
|
||||
lang_list.append(episode.contentLanguage)
|
||||
|
||||
# add to Language List subtitled languages
|
||||
if sub_list:
|
||||
for sub in sub_list:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user