Version 0.9.2
This commit is contained in:
1 parent
baecf07a4a
commit
646008ed99
2 files changed
+26
-19
No files matched your search
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<addon id="plugin.video.movistarplus"
|
||||
name="Movistar+"
|
||||
version="0.9.1"
|
||||
version="0.9.2"
|
||||
provider-name="Paco8">
|
||||
<requires>
|
||||
<!--- <import addon="xbmc.python" version="2.25.0"/> -->
|
||||
|
||||
+25
-18
@@ -1143,24 +1143,33 @@ class Movistar(object):
|
||||
#profile = 'OTT'
|
||||
#profile = 'LITE'
|
||||
|
||||
content = self.cache.load('vod_sections.json')
|
||||
content = self.cache.load('vod_sections2.json')
|
||||
if content:
|
||||
data = json.loads(content)
|
||||
else:
|
||||
url = 'https://apps.dof6.com/feed/conf.php?id=justconfig&id_perfil={}&dispositivo=cell'.format(profile)
|
||||
url = 'https://ottcache.dof6.com/movistarplus/yomvi/phone.android/{}/configuration/config_item?format=json&uisegment='.format(profile)
|
||||
data = self.net.load_data(url)
|
||||
self.cache.save_file('vod_sections.json', json.dumps(data, ensure_ascii=False))
|
||||
self.cache.save_file('vod_sections2.json', json.dumps(data, ensure_ascii=False))
|
||||
|
||||
submenu = data.get('YOMVIANDROID', {}).get('Menu', {}).get('Submenu', [])
|
||||
main_menu_items = []
|
||||
main_menu = data.get('VOD', {}).get('Menu', [])
|
||||
for m in main_menu:
|
||||
if m['@id'] == 'MENU-PRINCIPAL':
|
||||
for i in m['Item']:
|
||||
main_menu_items.append(i['@id'])
|
||||
|
||||
submenu = data.get('VOD', {}).get('Submenu', [])
|
||||
res = OrderedDict()
|
||||
for o in submenu:
|
||||
#print_json(o)
|
||||
menu = {}
|
||||
menu['visible'] = (o.get('@visible') != 'false')
|
||||
menu['visible'] = True
|
||||
menu['id'] = o.get('@id')
|
||||
if menu['id'] not in main_menu_items: continue
|
||||
|
||||
if 'Modulo' in o:
|
||||
section_name = o['@nombre'] if '@nombre' in o else o['@P']
|
||||
section_name = o['@nombre'] if '@nombre' in o else o['@P'] if '@P' in o else 'sin nombre'
|
||||
#print(section_name)
|
||||
modulo = o['Modulo']
|
||||
|
||||
section = []
|
||||
@@ -1170,13 +1179,21 @@ class Movistar(object):
|
||||
|
||||
if isinstance(modulo, list):
|
||||
for m in modulo:
|
||||
|
||||
sort = ''
|
||||
if 'Modificador' in m:
|
||||
#print(m['Modificador'])
|
||||
for p in m['Modificador']:
|
||||
#print(p)
|
||||
#if p['@type'] == 'novisible': continue
|
||||
if p['@id'] == 'ordenacion': sort = p['@selected']
|
||||
|
||||
if 'consulta' in m and m['consulta'].get('@endpoint_ref', '') == 'consultar':
|
||||
if not '@nombre' in m: continue
|
||||
#print (menu['id'], m['@nombre'])
|
||||
c = {}
|
||||
c['name'] = m['@nombre']
|
||||
pars = ''
|
||||
sort = ''
|
||||
|
||||
parametros = m['consulta']['parametro']
|
||||
if isinstance(parametros, dict):
|
||||
@@ -1184,14 +1201,12 @@ class Movistar(object):
|
||||
|
||||
for par in parametros:
|
||||
#print_json(par)
|
||||
if par.get('@incluir', '') == 'true':
|
||||
pars += '&{}={}'.format(par['@id'], par['@value'])
|
||||
if par['@id'] == 'sort':
|
||||
sort = par['@value']
|
||||
|
||||
pars = pars.replace('{suscripcion}', self.entitlements['suscripcion'])
|
||||
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'
|
||||
section.append(c)
|
||||
if len(section) > 0:
|
||||
@@ -1199,14 +1214,6 @@ class Movistar(object):
|
||||
menu['data'] = section
|
||||
res[menu['id']] = menu
|
||||
|
||||
if 'portada_cine_destacados' in res:
|
||||
res['portada_cine_destacados']['visible'] = True
|
||||
res['portada_cine_destacados']['name'] = 'Cine - Géneros'
|
||||
|
||||
if 'portada_series_destacados' in res:
|
||||
res['portada_series_destacados']['visible'] = True
|
||||
res['portada_series_destacados']['name'] = 'Series - Géneros'
|
||||
|
||||
return res
|
||||
|
||||
def install_key_file(self, filename):
|
||||
|
||||
Reference in new issue
Block a user