2020-12-21, 12:08
I'm about to (re)write a plugin for a content scraper that collects TV highlights from a website and show them in a widget using a dynamic content list. This is already done and works. Items in the dynamic list are based on list items for example:
...and so on. Items of the widget list only shows a very small set of available labels (only icon, title, channel, starttime) - but thats ok. For more detailed info I want to use an existing window: pvrguideinfo with id 10600. The corresponding DialogPVRInfo.xml holds the info labels (ListItem.ChannelNumber, ListItem.Plot, ListItem.Art(fanart) and so on), but I'm fiddling for hours how to push my own ListItems from above into this window - or in other words - how can I transfer my ListItems created from script into this window?
What I've had trying among other things is to generate a separate ListItem in the manner above and then open the window:
But none of the labels is shown.
In the past I have created my own WindowXMLDialog and filled it with Window(Home).properties, but for skin compatibility I don't want to use it, as its better to use the windows owned by the skin.
Any help would be greatly appreciated, code snippets are welcome.
If this thread is not in the right section, move it.
Code:
liz = xbmcgui.ListItem()
liz.setLabel('{} ({})'.format(item.get('pvrchannel', item.get('channel')), item.get('datetime').split(' ')[1]))
liz.setLabel2('{}'.format(item.get('title')))
liz.setInfo('video', {'genre': item.get('genre'), 'plot': item.get('plot'), 'duration': item.get('runtime'), 'rating': item.get('rating')})
liz.setArt({'icon': item.get('thumb'), 'thumb': item.get('thumb'), 'poster': item.get('thumb'), 'fanart': item.get('thumb'), 'logo': item.get('logo')})
liz.setProperty('StartTime', item.get('datetime'))
liz.setProperty('EndTime', item.get('enddate'))
liz.setProperty('RunTime', str(item.get('runtime') // 60))
liz.setProperty('Item', str(item.get('itemnumber')))
What I've had trying among other things is to generate a separate ListItem in the manner above and then open the window:
Code:
li.xbmcgui.ListItem()
li.setInfo(video, {'plot': 'my Plot', 'genre': 'Comedy', ...})
li.setArt({'icon': pathToIcon, 'thumb': patToThumb})
win = xbmcgui.Window(10600)
win.show()
In the past I have created my own WindowXMLDialog and filled it with Window(Home).properties, but for skin compatibility I don't want to use it, as its better to use the windows owned by the skin.
Any help would be greatly appreciated, code snippets are welcome.
If this thread is not in the right section, move it.