jurialmunkey / script.skinvariables

A helper script for Kodi skinners to construct multiple variables
GNU General Public License v3.0
37 stars 16 forks source link

null_id bug #35

Closed roidy closed 8 months ago

roidy commented 8 months ago

The null_id param doesn't seem to work as intended, take the following template:-

<includes>
    <variable name="Test" containers="9000" null_id="true" parent="Control.Hasfocus({id})">
        <value>$INFO[Container({id}).ListItem.Label]</value>
    </variable>
</includes>

Which generates the following code:-

<includes>
    <variable name="Test_C9000">
        <value condition="True">$INFO[Container(9000).ListItem.Label]</value>
    </variable>
    <variable name="Test">
        <value condition="True">$INFO[Container().ListItem.Label]</value>
    </variable>
    <variable name="Test_Container">
        <value condition="True">$INFO[Container().ListItem.Label]</value>
    </variable>
    <variable name="Test_Parent">
        <value condition="Control.Hasfocus(9000)">$VAR[Test_C9000]</value>
        <value condition="True">$VAR[Test]</value>
    </variable>
</includes>

Both variables 'Test' and 'Test_Container' are exactly the same and none of the generated variables are usable in DialogVideoInfo.

Wouldn't it be better if the Test variable had no container:-

<variable name="Test">
    <value condition="True">$INFO[ListItem.Label]</value>
</variable>

That way it's usable in DialogVideoInfo.

jurialmunkey commented 8 months ago

You need to use {listitem} not Container({id}).ListItem

roidy commented 8 months ago

You need to use {listitem} not Container({id}).ListItem

To do what? Fix the fact Test and Test_Container are the same or get a variable that's usable in DialogVideoInfo?

Not sure I understand, please post a simple example.


Edit:- disregard, I figured it out.