diff --git a/channels/mediasetplay.py b/channels/mediasetplay.py index 485d3acf..04c742ca 100644 --- a/channels/mediasetplay.py +++ b/channels/mediasetplay.py @@ -82,11 +82,11 @@ def live(item): if it['callSign'] in allguide: guide = allguide[it['callSign']] - plot = '[B]{}[/B]\n{}\n\nA Seguire:\n[B]{}[/B]\n{}'.format(guide['currentListing']['mediasetlisting$epgTitle'], - guide['currentListing']['description'], - guide['nextListing']['mediasetlisting$epgTitle'], - guide['nextListing']['description'],) - + plot = '[B]{}[/B]\n{}'.format(guide.get('currentListing', {}).get('mediasetlisting$epgTitle', ''), + guide.get('currentListing', {}).get('description', '')) + if 'nextListing' in guide.keys(): + plot += '\n\nA Seguire:\n[B]{}[/B]\n{}'.format(guide.get('nextListing', {}).get('mediasetlisting$epgTitle', ''), + guide.get('nextListing', {}).get('description', '')) itemlist.append(item.clone(title=support.typo(title, 'bold'), fulltitle=title, callSign=it['callSign'], urls=guide['tuningInstruction']['urn:theplatform:tv:location:any'], plot=plot, url=url, action='play', forcethumb=True)) itemlist.sort(key=lambda it: support.channels_order.get(it.fulltitle, 999)) diff --git a/specials/filmontv.py b/specials/filmontv.py index 9e73d328..2695cfba 100644 --- a/specials/filmontv.py +++ b/specials/filmontv.py @@ -262,7 +262,7 @@ def live(item): # make itemlist for ch in channel_list: itemlist += channels_dict[ch] - itemlist.sort(key=lambda it: support.channels_order[it.fulltitle]) + itemlist.sort(key=lambda it: support.channels_order.get(it.fulltitle, 1000)) return itemlist