Fix Discovery

This commit is contained in:
Alhaziel01
2021-02-19 16:09:40 +01:00
parent 345cb3a626
commit 0527ec2396

View File

@@ -113,6 +113,7 @@ def peliculas(item):
for key in pdict:
if key['type'] == 'show' and 'Free' in str(key.get('relationships',{}).get('contentPackages',{}).get('data',[])):
title = key['attributes']['name']
logger.debug(jsontools.dump(key))
plot = key['attributes'].get('description','')
url = '{}/programmi/{}'.format(host, key['attributes']['alternateId'])
seasons = key['attributes']['seasonNumbers']
@@ -143,7 +144,8 @@ def episodios(item):
for key in pdict:
if key['type'] == 'collection' and key.get('attributes',{}).get('component',{}).get('id', '') == 'tabbed-content':
mandatory = key['attributes']['component']['mandatoryParams']
mandatory = key['attributes']['component'].get('mandatoryParams','')
if not mandatory: return [support.Item(title='CONTENUTO PLUS')]
for option in key['attributes']['component']['filters'][0]['options']:
url = '{}/cms/collections/{}?decorators=viewingHistory&include=default&{}&{}'.format(api, key['id'], mandatory, option['parameter'])
seasons = []