diff --git a/addon.xml b/addon.xml index 220fa24..c6b3f39 100644 --- a/addon.xml +++ b/addon.xml @@ -1,7 +1,7 @@ diff --git a/resources/lib/movistar.py b/resources/lib/movistar.py index 85f437e..13c7017 100644 --- a/resources/lib/movistar.py +++ b/resources/lib/movistar.py @@ -827,6 +827,8 @@ class Movistar(object): video = data['Pases'][0] t['subscribed'] = self.is_subscribed_vod(video.get('tvProducts', [])) if 'ShowId' in video: t['show_id'] = video['ShowId'] + if 'Canal' in video and 'CasId' in video['Canal']: + t['cas_id'] = video['Canal']['CasId'] stype = None if 'catalog=catchup' in ed['Ficha']: stype = 'catch-up' diff --git a/resources/lib/proxy.py b/resources/lib/proxy.py index 5213619..389db58 100644 --- a/resources/lib/proxy.py +++ b/resources/lib/proxy.py @@ -116,6 +116,13 @@ class RequestHandler(BaseHTTPRequestHandler): content = content.replace('lang="{}"'.format(key), 'lang="{}"'.format(value)) content = re.sub(r'lang="q([^"]*)"', r'lang="es-[q\1]"', content) + if addon.getSettingBool('delete_ec3_audio'): + pattern = re.compile(r']*contentType="audio"[^>]*>.*?', re.DOTALL) + matches = pattern.findall(content) + for match in matches: + if 'codecs="ec-3"' in match: + content = content.replace(match, "\n") + # For U7D content = content.replace('timeShiftBufferDepth="PT3600S"', 'timeShiftBufferDepth="PT10800S"') diff --git a/resources/settings.xml b/resources/settings.xml index 731296e..1c987ca 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -18,6 +18,7 @@ +