Container(id).ListItemPosition(id).[infolabel] - not working?
#1
Hi,

can anyone confirm this info variable as working on Helix?
For me it isn't working at all. If I want to use it, I get an instant crash.

For example:

1.
Code:
<control type="label">
    [...]
    <label>$INFO[Container(11010).ListItemNoWrap(2).Label]</label>
</control>

2.
Code:
<control type="label">
    [...]
    <label>$INFO[Container(11010).ListItemPosition(3).Label]</label>
</control>


The first is working as intended, the second leads to a crash.
(Yes, there are at least 3 elements inside container 11010.)


Thanks for any help.

----
FYI:

Container(id).ListItemPosition(id).[infolabel]
Shows the infolabel for an item in a Container. the item id is the absolute position in the container. ( eg: Container(50).ListItemPosition(4).Genre )

(Source: http://kodi.wiki/view/InfoLabels)
Reply
#2
Debug log?
Reply
#3
Post complete code please + complete debug log. I gave ListItemPosition() a try some weeks ago and it worked fine for me.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#4
Of course, sorry that this information was missing at first...
Here a simpified code that is still producing the problem on my side:

Custom_TestWindow.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<window type="dialog" id="3209">
    <controls>
        <control id="11010" type="list">
            <content target="video">special://skin/extras/playlists/RandomMovies.xsp</content>
        </control>
    
        <control type="label">
                <label>$INFO[Container(11010).ListItemPosition(1).Label]</label>
        </control>
    </controls>
</window>

As soon as I want access this newly created window/dialog via ActivateWindow(3209), Kodi freezes
and I get a "Kodi is not responding" message from Windows. But the exact same code is working if you
just replace ListItemPosition with ListItem or ListItemNoWrap.


kodi.log: http://pastebin.com/SNgDfpwv
Code:
20:26:51 T:208   ERROR: CApplication::FrameMove(), too many exceptions
Reply
#5
(2015-07-12, 20:31)josch Wrote: Of course, sorry that this information was missing at first...
Here a simpified code that is still producing the problem on my side:

(2015-07-12, 15:35)phil65 Wrote: Post complete code please.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#6
Isn't simplifying the code a good step to localize the problem? At least I thought it would be better for you
to understand my issue with ease and in no time instead of having a look at a bunch of unrelated lines.

The simplified code ist still producing exactly the same problem, so in some way it's also "the complete code". Wink
But of course, here's the whole XML code I'm using for this custom window. I didn't want to hold it back, just
present my problem as simple as possible.

Thanks for your help!


Custom_MovieHub.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<window type="dialog" id="3209">
    <animation effect="slide" start="-1920" end="0" delay="0" time="200">WindowOpen</animation>
    <animation effect="slide" end="-1920" start="0" delay="0" time="200">WindowClose</animation>
    <defaultcontrol>9500</defaultcontrol>
    <controls>

        <control type="image">
            <width>1920</width>
            <height>1080</height>
            <texture colordiffuse="e6181818">common/white.png</texture>
            <aspectratio>scale</aspectratio>
        </control>
        
        <control type="label">
            <posx>102</posx>
            <posy>136</posy>
            <width>804</width>
            <font>_Font_RobotoBold-27</font>
            <label>Neu und ungesehen</label>
            <textcolor>3e888888</textcolor>
        </control>

        <control id="11010" type="list">
            <orientation>horizontal</orientation>
            <content target="video">special://skin/_custom/playlists/5RecentUnwatchedMovies.xsp</content>
        </control>

        <control type="group">    
            <include>Animation.SlideOpen.Right</include>
            <top>240</top>
            <left>102</left>

            <control type="group">
                <include>_MovieHub_CoverBgImg</include>
                <control type="image">
                    <include>_MovieHub_CoverAttr</include>
                    <texture background="true">$INFO[Container(11010).ListItemPosition(1).Art(poster)]</texture> <!-- ERROR! (is working with ListItemNoWrap) -->
                </control>
            </control>
            <control type="group">
                <left>252</left>
                <include>_MovieHub_CoverBgImg</include>
                <control type="image">
                    <include>_MovieHub_CoverAttr</include>
                    <texture background="true">$INFO[Container(11010).ListItemNoWrap(1).Art(poster)]</texture>
                </control>
            </control>
            <control type="group">
                <left>504</left>
                <include>_MovieHub_CoverBgImg</include>
                <control type="image">
                    <include>_MovieHub_CoverAttr</include>
                    <texture background="true">$INFO[Container(11010).ListItemNoWrap(2).Art(poster)]</texture>
                </control>
            </control>
            <control type="group">
                <left>756</left>
                <include>_MovieHub_CoverBgImg</include>
                <control type="image">
                    <include>_MovieHub_CoverAttr</include>
                    <texture background="true">$INFO[Container(11010).ListItemNoWrap(3).Art(poster)]</texture>
                </control>
            </control>
            <control type="group">
                <left>1008</left>
                <include>_MovieHub_CoverBgImg</include>
                <control type="image">
                    <include>_MovieHub_CoverAttr</include>
                    <texture background="true">$INFO[Container(11010).ListItemNoWrap(4).Art(poster)]</texture>
                </control>
            </control>

        </control>

        <control type="label">
            <posx>102</posx>
            <posy>553</posy>
            <width>804</width>
            <font>_Font_RobotoBold-27</font>
            <label>Zuletzt gesehen</label>
            <textcolor>3e888888</textcolor>
        </control>

        <control id="11020" type="list">
            <orientation>horizontal</orientation>
            <content target="video">special://skin/_custom/playlists/5LastSeenMovies.xsp</content>
        </control>

        <control type="group">    
            <include>Animation.SlideOpen.Right</include>
            <top>658</top>
            <left>102</left>

            <control type="group">
                <include>_MovieHub_CoverBgImg</include>
                <control id="11023" type="image">
                    <include>_MovieHub_CoverAttr</include>
                    <texture background="true">$INFO[Container(11020).ListItemNoWrap(0).Art(poster)]</texture>
                </control>
            </control>
            <control type="group">
                <left>245</left>
                <include>_MovieHub_CoverBgImg</include>
                <control type="image">
                    <include>_MovieHub_CoverAttr</include>
                    <texture background="true">$INFO[Container(11020).ListItemNoWrap(1).Art(poster)]</texture>
                </control>
            </control>
            <control type="group">
                <left>490</left>
                <include>_MovieHub_CoverBgImg</include>
                <control type="image">
                    <include>_MovieHub_CoverAttr</include>
                    <texture background="true">$INFO[Container(11020).ListItemNoWrap(2).Art(poster)]</texture>
                </control>
            </control>
            <control type="group">
                <left>735</left>
                <include>_MovieHub_CoverBgImg</include>
                <control type="image">
                    <include>_MovieHub_CoverAttr</include>
                    <texture background="true">$INFO[Container(11020).ListItemNoWrap(3).Art(poster)]</texture>
                </control>
            </control>
            <control type="group">
                <left>980</left>
                <include>_MovieHub_CoverBgImg</include>
                <control type="image">
                    <include>_MovieHub_CoverAttr</include>
                    <texture background="true">$INFO[Container(11020).ListItemNoWrap(4).Art(poster)]</texture>
                </control>
            </control>
        </control>
        
        <control type="label">
            <posx>1581</posx>
            <posy>310</posy>
            <width>690</width>
            <font>_Font_RobotoBold-27</font>
            <label>Menu</label>
            <textcolor>3e888888</textcolor>
        </control>

        <control type="list" id="9500">
            <posx>1382</posx>
            <posy>372</posy>
            <width>1311</width>
            <height>700</height>
            <onleft>11010</onleft>                
            <onup>9500</onup>
            <ondown>9500</ondown>
            <orientation>vertical</orientation>
            <itemlayout width="432" height="80">
                <control type="image">
                    <width>432</width>
                    <height>80</height>
                    <texture colordiffuse="f2181818">common/border-inner.png</texture>
                </control>
                <control type="image">
                    <width>80</width>
                    <height>80</height>
                    <texture>$INFO[ListItem.Icon]</texture>
                    <aspectratio>scale</aspectratio>
                    <colordiffuse>9fdddddd</colordiffuse>
                </control>
                <control type="label">
                    <right>30</right>
                    <left>100</left>
                    <height>80</height>
                    <align>right</align>
                    <aligny>center</aligny>
                    <font>_Font_RobotoRegular-29</font>
                    <textcolor>9fdddddd</textcolor>
                    <label>$INFO[ListItem.Label]</label>
                </control>
            </itemlayout>
            <focusedlayout width="432" height="80">
                <control type="group">
                    <control type="image">
                        <width>432</width>
                        <height>80</height>
                        <texture border="5" colordiffuse="3e888888">common/border-inner.png</texture>
                    </control>
                    <control type="image">
                        <posx>424</posx>
                        <width>8</width>
                        <height>80</height>
                        <texture colordiffuse="f233b5e5">common/white.png</texture>
                    </control>
                </control>
                <control type="image">
                    <width>80</width>
                    <height>80</height>
                    <texture>$INFO[ListItem.Icon]</texture>
                    <aspectratio>scale</aspectratio>
                    <colordiffuse>fff0f0f0</colordiffuse>
                </control>
                <control type="label">
                    <right>30</right>
                    <left>100</left>
                    <height>80</height>
                    <align>right</align>
                    <aligny>center</aligny>
                    <font>_Font_RobotoRegular-29</font>
                    <textcolor>fff0f0f0</textcolor>
                    <label>$INFO[ListItem.Label]</label>
                </control>
            </focusedlayout>
            <content>
                <item id="1">
                    <label>Alle Filme</label>          
                    <onclick>ActivateWindow(Videos,special://skin/_custom/playlists/Movies_All.xsp,return)</onclick>
                    <icon>special://skin/extras/icons/title.png</icon>
                    <property name="Color">1</property>
                </item>
                <item id="2">
                    <label>Zuletzt hinzugefügt</label>        
                    <onclick>ActivateWindow(Videos,special://skin/_custom/playlists/Movies_Recent.xsp,return)</onclick>
                    <icon>special://skin/_custom/icons/recentlyadded.png</icon>
                    <property name="Color">1</property>
                </item>
                <item id="3">
                    <label>Noch nicht gesehen</label>        
                    <onclick>ActivateWindow(Videos,special://skin/_custom/playlists/Movies_Unwatched.xsp,return)</onclick>
                    <icon>special://skin/_custom/icons/unwatched.png</icon>
                    <property name="Color">1</property>
                </item>
                <item id="4">
                    <label>Begonnene Filme</label>        
                    <onclick>ActivateWindow(Videos,special://skin/_custom/playlists/Movies_InProgress.xsp,return)</onclick>
                    <icon>special://skin/_custom/icons/inprogress.png</icon>
                    <property name="Color">1</property>
                </item>
                <item id="5">
                    <label>Nach Genre</label>        
                    <onclick>ActivateWindow(Videos,special://skin/_custom/playlists/Movies_Genre.xsp,return)</onclick>
                    <icon>special://skin/_custom/icons/genre.png</icon>
                    <property name="Color">1</property>
                </item>
                <item id="6">
                    <label>Nach Laufzeit</label>        
                    <onclick>ActivateWindow(Videos,special://skin/_custom/playlists/Movies_Duration.xsp,return)</onclick>
                    <icon>special://skin/_custom/icons/duration.png</icon>
                    <property name="Color">1</property>
                </item>
                <item id="7">
                    <label>Nach Bewertung</label>        
                    <onclick>ActivateWindow(Videos,special://skin/_custom/playlists/Movies_Rating.xsp,return)</onclick>
                    <icon>special://skin/_custom/icons/rating.png</icon>
                    <property name="Color">1</property>
                </item>
            </content>
        </control>

    </controls>
</window>

Used includes:
Code:
    <include name="_MovieHub_CoverBgImg">
        <control type="image">
            <width>222</width>
            <height>330</height>    
            <texture background="true">special://skin/_custom/cover/cover.png</texture>
            <aspectratio>stretch</aspectratio>
        </control>
    </include>

    <include name="_MovieHub_CoverAttr">
        <left>3</left>
        <top>30</top>
        <width>213</width>
        <height>292</height>
        <aspectratio>stretch</aspectratio>
    </include>

Used fonts:
Code:
<font>
            <name>_Font_RobotoBold-27</name>
            <filename>Roboto-Bold.ttf</filename>
            <size>27</size>
        </font>
        <font>
            <name>_Font_RobotoRegular-29</name>
            <filename>Roboto-Regular.ttf</filename>
            <size>29</size>
        </font>
Reply
#7
(2015-07-13, 12:08)josch Wrote: Isn't simplifying the code a good step to localize the problem? At least I thought it would be better for you
to understand my issue with ease and in no time instead of having a look at a bunch of unrelated lines.

Thanks for your help!

Sometimes yes, but if it triggers a crash it can help to know the bigger context. Will try to reproduce it when I find some time.
Do you have a Git branch set up with this so that I have a complete out-of-the-box testing case?
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#8
All right, many thanks for your effort!

I don't have a Git branch or something similar but for the easiest way of testing, I've just uploaded a .zip file
with a minimal modified version of Eminence (latest Version).

Attachment: skin.eminence.custom.zip

The only files which got modified are:
  1. Custom_Hub_Movies.xml (Replaced originially contended group control with an own one)
  2. Includes.xml (Added 2 include definitions)
  3. Font.xml (Added 2 font definitions)

Used custom icons and playlists are also included, so you should be able to see it running out of the box.
The included Custom_Hub_Movies.xml only uses ListItemNoWrap() right now, so it shouldn't crash on the
first run. Just press the movie button on the home screen and the custom window should appear.

To provoke the error just appropriately replace a ListItemNoWrap() function use with ListItemPosition().

Thanks.
Reply
#9
You must add item layout and focused layout to any container. For hidden lists use:
Code:
<itemlayout />
<focusedlayout />
Reply

Logout Mark Read Team Forum Stats Members Help
Container(id).ListItemPosition(id).[infolabel] - not working?0