Passing $INFO[.. in a listitem?
#1
Hi.

Looking to make a list of all the window properties I use between the script and my skin - for debugging purposes.
Skinning it... is possible, but would be an almost unbearable labour.. knowing that python should be able to do it in a breeze.

I would like to send a list of listitems with the relevant data to a panelcontainer and let is show my parameters. But any automation that works is welcomed.

Through pure XML it works nicely. Here is the syntax of a panel showing the dynamically changing values of a property:

Code:
<control type="panel" ...
    <itemlayout>..
        <control type="label">
            <info>Listitem.Label</info>
...
        <control type="label">
            <label>$INFO[Listitem.Label2]</label>
...
    <contents>
        <item>
            <label>PROPERTY</label>
            <label2>$INFO[Window(Home).Property(PROPERTY)]</label2>
            <onclick>noop</onclick>
        </item>
        ....

Now, what would be sweeter than to fill this list through code? ..Nothing!.. well.. pretty much anything really, but it would count as something...

The python working-but-not-working code:
Code:
L = ('PROPERTY','PROPERTY2'.... etc... 'PROPERTY[N]')
for propertyname in L:
    li = xbmcgui.ListItem(label=propertyname, label2='$INFO[Window(Home).Property(' + propertyname + ')]')
    LS.append(li)
ACTIVEWINDOW.getControl(91122).setStaticContent(LS)

It does transfer the strings to the list, but Label2 ends up as it is, showing the SYNTAX ( aka $INFO[Window(Home).Property(PROPERTY)] ) and not the translated values..

much dissapoint!

What do?
Reply
#2
label2=xbmc.getInfoLabel("Window(..).whatever")
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#3
I doubt this will update dynamically in the skin when the value changes? But I'll try anything once..
Reply
#4
Correct, they wont update. You would have to repopulate the list again in that case.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#5
Baxk to square one then... (Assuming here that Kodi handles the updating of properties shown through xml more elegantly than repopulating the entire list?)
Reply

Logout Mark Read Team Forum Stats Members Help
Passing $INFO[.. in a listitem?0