xbmc.getInfoLabel based on string value
#1
I'm pulling some infolabels into a script - i.e.

Labeltoread = xbmc.getInfoLabel("ListItem.Label").decode('utf-8')

which works fine.   However, in a few cases where the infolabel has been generated and assigned by the script.  Or to say it another way, the name of the label is not known at this time, but it is contained in a python string. I've been trying to use this (or small variations of adding quotes) - 

Labeltoread = xbmc.getInfoLabel(PythonString).decode('utf-8')

So my question is, am I trying to do something not supported?   Or do I just need to study python a little more and get the syntax right? 
(disclosure: the last meaningful code I wrote was in Fortran on floppy disks, but I try to keep up)

Thanks.
Reply
#2
You are likely abusing of the info interface. Infolabels/bools serve the purpose of accessing kodi core gui information in scripts and skins. What exactly are you trying to do?
If the information you are trying to access is set on the listitems consider using listitem.setProperty (https://codedocs.xyz/xbmc/xbmc/group__py...53667e7d81)
Reply
#3
I’m working on a scrollable view of playlists, and have pretty much figured out how to assign custom icons to the items. However, if no icon has been assigned, I’m left with no icon at all. So this was an attempt to see if the icon had been assigned, and if not, to then set a default icon.

The catch that I have created for myself, is that the variable that holds the path to the icon, is based on the playlist name.
Reply

Logout Mark Read Team Forum Stats Members Help
xbmc.getInfoLabel based on string value0