Skip to content

Commit

Permalink
Version 0.10.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Paco8 committed Dec 27, 2024
1 parent 5ad288d commit d94cf59
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.movistarplus"
name="Movistar+"
version="0.10.3"
version="0.10.4"
provider-name="Paco8">
<requires>
<!--- <import addon="xbmc.python" version="2.25.0"/> -->
Expand Down
23 changes: 13 additions & 10 deletions resources/lib/movistar.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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'
Expand All @@ -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,
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions resources/lib/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']):
Expand Down

0 comments on commit d94cf59

Please sign in to comment.