From 0527ec2396dd82ec9cf50baef1a98be9d920bd78 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Fri, 19 Feb 2021 16:09:40 +0100 Subject: [PATCH] Fix Discovery --- channels/discoveryplus.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/channels/discoveryplus.py b/channels/discoveryplus.py index 50e661a0..a3fb3925 100644 --- a/channels/discoveryplus.py +++ b/channels/discoveryplus.py @@ -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 = []