Fix Anteprime dirette Rai
This commit is contained in:
+12
-3
@@ -155,12 +155,21 @@ def Type(item):
|
|||||||
def live(item):
|
def live(item):
|
||||||
support.log()
|
support.log()
|
||||||
itemlist =[]
|
itemlist =[]
|
||||||
|
info={}
|
||||||
json = current_session.get(item.url).json()['dirette']
|
json = current_session.get(item.url).json()['dirette']
|
||||||
onAir = current_session.get(onair).json()['on_air']
|
onAir = current_session.get(onair).json()['on_air']
|
||||||
|
support.log(onAir)
|
||||||
|
for key in onAir:
|
||||||
|
channel = key['channel']
|
||||||
|
info[channel] = {}
|
||||||
|
info[channel]['fanart'] = getUrl(key['currentItem']['image'])
|
||||||
|
info[channel]['plot'] = support.typo(key['currentItem']['name'],'bold')+ '\n\n' + key['currentItem']['description']
|
||||||
|
|
||||||
for i, key in enumerate(json):
|
for i, key in enumerate(json):
|
||||||
itemlist.append(item.clone(title = support.typo(key['channel'], 'bold'), fulltitle = key['channel'], show = key['channel'], url = key['video']['contentUrl'],
|
channel = key['channel']
|
||||||
thumbnail = key['transparent-icon'].replace("[RESOLUTION]", "256x-"), forcethumb = True , fanart = getUrl(onAir[i]['currentItem']['image']),
|
itemlist.append(item.clone(title = support.typo(channel, 'bold'), fulltitle = channel, show = channel, url = key['video']['contentUrl'],
|
||||||
plot = support.typo(onAir[i]['currentItem']['name'],'bold')+ '\n\n' + onAir[i]['currentItem']['description'], action = 'play'))
|
thumbnail = key['transparent-icon'].replace("[RESOLUTION]", "256x-"), forcethumb = True , fanart = info[channel]['fanart'],
|
||||||
|
plot = info[channel]['plot'], action = 'play'))
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user