From 4513ad32821e5c873e56eca87f3debe4d71af9ba Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Fri, 19 Feb 2021 17:03:12 +0100 Subject: [PATCH] Fix Mediaset Play --- channels/mediasetplay.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/channels/mediasetplay.py b/channels/mediasetplay.py index ab0b0ede..12e84ab0 100644 --- a/channels/mediasetplay.py +++ b/channels/mediasetplay.py @@ -174,27 +174,27 @@ def peliculas(item): for it in json: if item.search.lower() in it['title'].lower() and it['title'] not in titlelist: titlelist.append(it['title']) - if item.contentType == 'movie': + # if item.contentType == 'movie': + # action = 'findvideos' + # urls = [] + # if 'media' not in it: it = subBrand(it['mediasetprogram$brandId'])[-1] + # if 'media' in it: + # for key in it['media']: + # urls.append(key['publicUrl']) + # elif item.contentType == 'tvshow': + # action = 'epmenu' + # urls = it['mediasetprogram$brandId'] + # else: + if 'media' in it: action = 'findvideos' + contentType = 'movie' urls = [] - if 'media' not in it: it = subBrand(it['mediasetprogram$brandId'])[-1] - if 'media' in it: - for key in it['media']: - urls.append(key['publicUrl']) - elif item.contentType == 'tvshow': - action = 'epmenu' - urls = it['mediasetprogram$brandId'] + for key in it['media']: + urls.append(key['publicUrl']) else: - if 'media' in it: - action = 'findvideos' - contentType = 'movie' - urls = [] - for key in it['media']: - urls.append(key['publicUrl']) - else: - action = 'epmenu' - contentType = 'tvshow' - urls = it['mediasetprogram$brandId'] + action = 'epmenu' + contentType = 'tvshow' + urls = it['mediasetprogram$brandId'] if urls: title = it['mediasetprogram$brandTitle'] + ' - ' if 'mediasetprogram$brandTitle' in it and it['mediasetprogram$brandTitle'] != it['title'] else '' itemlist.append(