From 9f231db4d130fb1e088e1ba2fe469c9f1f2c86fa Mon Sep 17 00:00:00 2001 From: mac12m99 <10120390+mac12m99@users.noreply.github.com> Date: Sat, 20 Mar 2021 21:02:18 +0100 Subject: [PATCH] fix errore mediasetplay nelle sezioni con molti elementi + fix minori --- channels/mediasetplay.py | 2 +- service.py | 5 ++++- specials/filmontv.py | 7 +++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/channels/mediasetplay.py b/channels/mediasetplay.py index 67d210c1..7eb02c20 100644 --- a/channels/mediasetplay.py +++ b/channels/mediasetplay.py @@ -249,7 +249,7 @@ def episodios(item): logger.debug() itemlist = [] json = current_session.get('https://feed.entertainment.tv.theplatform.eu/f/PR1GhC/mediaset-prod-all-programs?byCustomValue={subBrandId}{' - + item.url + '}&range=0-10000').json()['entries'] + + item.url + '}&range=0-1000').json()['entries'] for it in json: urls = [] diff --git a/service.py b/service.py index f92a57d8..323b12dc 100644 --- a/service.py +++ b/service.py @@ -165,7 +165,10 @@ def check_for_update(overwrite=True): if estado: # If the update was successful ... estado_verify_playcount_series = True # ... is checked to change the Video Library option - interval = int(serie.active) # Could be the bool type + try: + interval = int(serie.active) # Could be the bool type + except: + interval = 1 if not serie.active: # if the series is not active discard diff --git a/specials/filmontv.py b/specials/filmontv.py index 0d1bd110..9b059edc 100644 --- a/specials/filmontv.py +++ b/specials/filmontv.py @@ -266,6 +266,9 @@ def live(item): def load_live(channel_name): - channel = __import__('%s.%s' % ('channels', channel_name), None, None, ['%s.%s' % ('channels', channel_name)]) - itemlist = channel.live(channel.mainlist(Item())[0]) + try: + channel = __import__('%s.%s' % ('channels', channel_name), None, None, ['%s.%s' % ('channels', channel_name)]) + itemlist = channel.live(channel.mainlist(Item())[0]) + except: + itemlist = [] return channel_name, itemlist