Kodi Community Forum

Full Version: Q: Load ListItem details on focus
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I have a list view of videos (xbmcgui.ListItem). I'd like to load the contents of the infoLabels lazily on demand, i.e. when it's shown.

Is this possible?

dero
Interesting Question. I can't fully answer. But I know that you can fill the ListItem's infolabels at any time (before are after adding them to the parent ControlList container using list_item_instance.setInfo(type, infolabels) where type is string ('video'|'music'|'pictures') and infolabels is dict of {label: value}.

It should be possible to grab the onFocus-Event (and maybe filter out the action to show the infolabels) and then fill the ListItem's infolabels on demand. I did not test this and can't guarantee that it will work. Please update this thread when you found a way Smile

regards,
sphere
Nope, you can't do this, at least not reliably - messing with XBMC's internal list items is definitely not the way to hack around it.

We do aim to allow something like this in future.
@jmarshall: OK Smile Is it also not recommend to fill the ListItem's infolabels after creation in a script add-on?