From d94cf592ddc2fd3f78c3a6bfe73f8b3b36b0b718 Mon Sep 17 00:00:00 2001 From: Paco8 <5084042+Paco8@users.noreply.github.com> Date: Fri, 27 Dec 2024 11:03:04 +0100 Subject: [PATCH] Version 0.10.4 --- addon.xml | 2 +- resources/lib/movistar.py | 23 +++++++++++++---------- resources/lib/plugin.py | 4 ++-- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/addon.xml b/addon.xml index c6b3f39..762f5f7 100644 --- a/addon.xml +++ b/addon.xml @@ -1,7 +1,7 @@ diff --git a/resources/lib/movistar.py b/resources/lib/movistar.py index 13c7017..9729637 100644 --- a/resources/lib/movistar.py +++ b/resources/lib/movistar.py @@ -37,9 +37,12 @@ class Movistar(object): 'demarcation': 0} add_extra_info = True - dplayer = 'webplayer' - device_code = 'WP_OTT' - manufacturer = 'Firefox' + #dplayer = 'webplayer' + #device_code = 'WP_OTT' + #manufacturer = 'Firefox' + dplayer = 'android.tv' + device_code = 'SMARTTV_OTT' + manufacturer = 'LG' account_dir = 'account_1' def __init__(self, config_directory, reuse_devices=False): @@ -228,7 +231,7 @@ def get_token(self): url = self.endpoints['initdata'].format(deviceType=self.dplayer, DEVICEID=self.account['device_id']) response = self.net.session.post(url, data=json.dumps(data), headers=headers) content = response.content.decode('utf-8') - #LOG('get_token response: {}'.format(content)) + LOG('get_token response: {}'.format(content)) try: d = json.loads(content) except: @@ -473,7 +476,7 @@ def change_profile(self, id): def load_epg_data(self, date_str, duration=2, channels=''): demarcation = self.account['demarcation'] - url = self.endpoints['rejilla'].format(deviceType=self.dplayer, profile=self.account['platform'], UTCDATETIME=date_str, DURATION=duration, CHANNELS=channels, NETWORK='movistarplus', mdrm='true', demarcation=demarcation) + url = self.endpoints['rejilla'].format(deviceType='webplayer', profile=self.account['platform'], UTCDATETIME=date_str, DURATION=duration, CHANNELS=channels, NETWORK='movistarplus', mdrm='true', demarcation=demarcation) if self.quality == 'UHD': url += '&filterQuality=UHD' #LOG(url) data = self.net.load_data(url) @@ -622,7 +625,7 @@ def get_channels(self): if content: data = json.loads(content) else: - url = self.endpoints['canales'].format(deviceType=self.dplayer, profile=profile, mdrm='true', demarcation=demarcation) + url = self.endpoints['canales'].format(deviceType='webplayer', profile=profile, mdrm='true', demarcation=demarcation) if self.quality == 'UHD': url += '&filterQuality=UHD' #LOG(url) data = self.net.load_data(url) @@ -720,7 +723,7 @@ def delete_from_wishlist(self, id, stype='vod'): def get_wishlist_url(self): url = self.endpoints['favoritos'].format( - deviceType='android.tv', DIGITALPLUSUSERIDC=self.account['encoded_user'], PROFILE=self.account['platform'], + deviceType=self.dplayer, DIGITALPLUSUSERIDC=self.account['encoded_user'], PROFILE=self.account['platform'], ACCOUNTNUMBER=self.account['id'], idsOnly='false', start=1, end=50, mdrm='true', demarcation=self.account['demarcation']) #url += '&filter=AD-SINX&topic=CN' if self.quality == 'UHD': url += '&filterQuality=UHD' @@ -745,7 +748,7 @@ def get_viewings_url(self): def get_search_url(self, search_term): url = self.endpoints['buscar_best'].format( - deviceType='android.tv', + deviceType=self.dplayer, ACCOUNTNUMBER=self.account['id'], profile=self.account['platform'], texto=search_term, @@ -774,7 +777,7 @@ def get_favorite_data(self, links): return res def get_ficha_url(self, id, mode='GLOBAL', catalog=''): - url = self.endpoints['ficha'].format(deviceType='android.tv', id=id, profile=self.account['platform'], mediatype='FOTOV', version='7.1', mode=mode, catalog=catalog, channels='', state='', mdrm='true', demarcation=self.account['demarcation'], legacyBoxOffice='') + url = self.endpoints['ficha'].format(deviceType=self.dplayer, id=id, profile=self.account['platform'], mediatype='FOTOV', version='7.1', mode=mode, catalog=catalog, channels='', state='', mdrm='true', demarcation=self.account['demarcation'], legacyBoxOffice='') url = url.replace('state=&', '') if self.quality == 'UHD': url += '&filterQuality=UHD' #print(url) @@ -1250,7 +1253,7 @@ def get_vod_sections(self): pars += '&{}={}'.format(par['@id'], par['@value']) pars = pars.replace('{suscripcion}', self.entitlements['suscripcion']) - c['url'] = self.endpoints['consultar'].format(deviceType='android.tv', profile=profile, sort=sort, start=1, end=50, mdrm='true', demarcation=self.account['demarcation']) + c['url'] = self.endpoints['consultar'].format(deviceType=self.dplayer, profile=profile, sort=sort, start=1, end=50, mdrm='true', demarcation=self.account['demarcation']) c['url'] += pars #print(c['url']) if self.quality == 'UHD': c['url'] += '&filterQuality=UHD' diff --git a/resources/lib/plugin.py b/resources/lib/plugin.py index 296c475..394dc45 100644 --- a/resources/lib/plugin.py +++ b/resources/lib/plugin.py @@ -92,8 +92,8 @@ def play(params): return else: url = d['url'] - if True: - url = url.replace('DASH_WPC_WIDEVINE', 'DASH_TV_WIDEVINE') + #if True: + # url = url.replace('DASH_WPC_WIDEVINE', 'DASH_TV_WIDEVINE') # U7D from start and end times if stype == 'tv' and all(param in params for param in ['cas_id', 'start_time', 'end_time']):