From dcf2df88bbdee6e2e4b61b7facc4aab8cea648e1 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Mon, 3 Aug 2020 17:55:32 +0200 Subject: [PATCH] Mediaset Play: Supporto a Restart --- channels/mediasetplay.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/channels/mediasetplay.py b/channels/mediasetplay.py index ac46fe8d..42c956c6 100644 --- a/channels/mediasetplay.py +++ b/channels/mediasetplay.py @@ -81,8 +81,12 @@ def live(item): urls = [] if it['tuningInstruction'] and not it['mediasetstation$digitalOnly']: guide=current_session.get('https://static3.mediasetplay.mediaset.it/apigw/nownext/' + it['callSign'] + '.json').json()['response'] + if 'restartUrl' in guide['currentListing']: + urls = [guide['currentListing']['restartUrl']] + else: + for key in it['tuningInstruction']['urn:theplatform:tv:location:any']: + urls += key['publicUrls'] plot = support.typo(guide['currentListing']['mediasetlisting$epgTitle'],'bold') + '\n' + guide['currentListing']['mediasetlisting$shortDescription'] + '\n' + guide['currentListing']['description'] + '\n\n' + support.typo('A Seguire:' + guide['nextListing']['mediasetlisting$epgTitle'], 'bold') - for key in it['tuningInstruction']['urn:theplatform:tv:location:any']: urls += key['publicUrls'] itemlist.append(item.clone(title=support.typo(it['title'], 'bold'), fulltitle=it['title'], show=it['title'], @@ -209,7 +213,6 @@ def play(item): item.license = lic_url % support.match(sec_data, patron=r'pid=([^|]+)').match data = support.match(sec_data, patron=r'