Bug Leia Bug? related to ListItem.Property() in other control lists
#1
Best way I can put it is that Container(9000).ListItem.Property() works everywhere but inside a list control.

It works here
Code:
                <control type="image">
                    <visible>String.IsEqual(Container(9000).ListItem.Property(submenuVisibility),movies)</visible>
                </control>
but it doesn't work here or in any control inside this control
Code:
                <control type="list" id="8000">
                    <control
                        <visible>String.IsEqual(Container(9000).ListItem.Property(submenuVisibility),movies)</visible>
                    </control>
                </control>

The second one is always false, it has no access to the content in control 9000.

I flattened the Home.xml of Metropolis to the minimum so I could demonstrate this (no includes or variables outside of this window view other than script.skin.helper.widgets for the content of the widget).
Code:
<?xml version="1.0" encoding="UTF-8"?>
<window>
    <defaultcontrol always="true">9000</defaultcontrol>
    <controls>

        <!-- Sub-menus and upper-menus -->
        <control type="group" id="9004">
            <!-- Widgets for all home views -->
            <control type="group">
                <!-- Widget arrow for all home views -->
                <control type="image">
                    <posx>625</posx>
                    <posy>420</posy>
                    <width>30</width>
                    <height>30</height>
                    <texture>ArrowUp.png</texture>
                    <colordiffuse>HelpArrowDiffuse</colordiffuse>
                    <visible>!String.IsEmpty(Container(9000).ListItem.Property(widget))</visible>
                    <visible>![Control.HasFocus(8000)]</visible>
                </control>
                <!-- Widget titles for all home views -->
                <control type="label">
                    <posx>355</posx>
                    <posy>400</posy>
                    <width>570</width>
                    <height>25</height>
                    <align>center</align>
                    <aligny>center</aligny>
                    <font>METF_RecentlyAddedTitle</font>
                    <textcolor>HomeMenuText</textcolor>
                    <label>[b]$INFO[Container(9000).ListItem.Property(widgetName)][/b]</label>
                    <shadowcolor>ff000000</shadowcolor>
                    <visible>!String.IsEmpty(Container(9000).ListItem.Property(widget))</visible>
                    <visible>![Control.HasFocus(8000)]</visible>
                </control>
            </control>

            <!-- Widgets -->
            <control type="group" id="9002">

                <control type="image">
                    <visible>String.IsEqual(Container(9000).ListItem.Property(submenuVisibility),movies)</visible>
                    <posx>265</posx>
                    <posy>560</posy>
                    <width>250</width>
                    <height>140</height>
                    <aspectratio align="right" aligny="center">keep</aspectratio>
                    <bordertexture border="6">frames/thumb_border_round.png</bordertexture>
                    <bordersize>6</bordersize>
                    <texture diffuse="frames/EpisodeMatte.png">$INFO[Container(8000).ListItem.Icon]</texture>
                </control>
                <control type="list" id="8000">
                    <visible>String.IsEqual(Container(9000).ListItem.Property(submenuVisibility),movies)</visible>
                    <posx>522</posx>
                    <posy>563</posy>
                    <width>510</width>
                    <height>135</height>
                    <onup>8000</onup>
                    <ondown>8000</ondown>
                    <onleft>9000</onleft>
                    <onright>9000</onright>
                    <viewtype>list</viewtype>
                    <orientation>vertical</orientation>
                    <scrolltime>200</scrolltime>
                    <itemlayout width="510" height="27">
                        <control type="label">
                            <posx>10</posx>
                            <posy>-2</posy>
                            <width>500</width>
                            <height>27</height>
                            <align>left</align>
                            <aligny>center</aligny>
                            <scrollout>false</scrollout>
                            <pauseatend>600</pauseatend>
                            <scrollspeed>20</scrollspeed>
                            <font>METF_RecentlyAddedListText</font>
                            <textcolor>RecentlyAddedNF</textcolor>
                            <label>$INFO[ListItem.Label]</label>
                            <visible>[!String.IsEmpty(Container(9000).ListItem.Property(widget))] | [Control.HasFocus(8000)]</visible>
                        </control>
                    </itemlayout>
                    <focusedlayout width="510" height="27">
                        <!-- Focus Bar -->
                        <control type="image">
                            <posx>0</posx>
                            <posy>0</posy>
                            <width>510</width>
                            <height>27</height>
                            <aligny>center</aligny>
                            <texture>FocusLine.png</texture>
                            <colordiffuse>FocusBar</colordiffuse>
                            <visible>[!String.IsEmpty(Container(9000).ListItem.Property(widget))] | [Control.HasFocus(8000)]</visible>
                        </control>
                        <control type="label">
                            <posx>10</posx>
                            <posy>-2</posy>
                            <width>500</width>
                            <height>27</height>
                            <align>left</align>
                            <aligny>center</aligny>
                            <scrollout>false</scrollout>
                            <pauseatend>600</pauseatend>
                            <scrollspeed>20</scrollspeed>
                            <font>METF_RecentlyAddedListText</font>
                            <textcolor>FocusBarText</textcolor>
                            <label>$INFO[ListItem.Label]</label>
                            <visible>[!String.IsEmpty(Container(9000).ListItem.Property(widget))] | [Control.HasFocus(8000)]</visible>
                        </control>                            
                    </focusedlayout>
                    <content target="videos">plugin://script.skin.helper.widgets/?action=recent&amp;mediatype=movies&amp;reload=$INFO[Window(home).Property(widgetreload-movies)]</content>
                </control>
            </control>
        </control>
<!-- Main Menu -->
        <control type="wraplist" id="9000">
            <posx>0</posx>
            <posy>450</posy>
            <height>450</height>
            <width>1280</width>
            <onup>9002</onup>
            <ondown>9001</ondown>
            <onleft>9000</onleft>
            <onright>9000</onright>
            <viewtype>list</viewtype>
            <orientation>horizontal</orientation>
            <focusposition>2</focusposition>
            <scrolltime>200</scrolltime>
            <itemgap>0</itemgap>
            <preloaditems>2</preloaditems>
            <itemlayout height="60" width="300">
                <control type="label">
                    <left>-110</left>
                    <top>0</top>
                    <width>298</width>
                    <height>60</height>
                    <font>METF_HorizMenu</font>
                    <textcolor>SubmenuText</textcolor>
                    <align>center</align>
                    <aligny>center</aligny>
                    <label>$INFO[ListItem.Label]</label>
                </control>
            </itemlayout>
            <focusedlayout height="60" width="300">
                <control type="label">
                    <left>-110</left>
                    <top>0</top>
                    <width>298</width>
                    <height>60</height>
                    <font>METF_HorizMenu</font>
                    <textcolor>SubmenuTextFocused</textcolor>
                    <shadowcolor>ff000000</shadowcolor>
                    <align>center</align>
                    <aligny>center</aligny>
                    <label>$INFO[ListItem.Label]</label>
                </control>
            </focusedlayout>
            <content>
                <item id="1">
                    <property name="id">$NUMBER[1]</property>
                    <label>$LOCALIZE[342]</label>
                    <label2>Common menu item</label2>
                    <icon>home_icons/movies.png</icon>
                    <thumb />
                    <property name="labelID">movies</property>
                    <property name="defaultID">movies</property>
                    <property name="widget">RecentMovies</property>
                    <property name="widgetName">20386</property>
                    <property name="widgetType">movies</property>
                    <property name="widgetPath">plugin://script.skin.helper.widgets/?action=recent&amp;mediatype=movies&amp;reload=$INFO[Window(home).Property(widgetreload-movies)]</property>
                    <property name="widgetTarget">videos</property>
                    <property name="background">home\movies\</property>
                    <property name="backgroundName">342</property>
                    <visible>Library.HasContent(Movies)</visible>
                    <onclick>ActivateWindow(Videos,MovieTitles,return)</onclick>
                    <property name="path">ActivateWindow(Videos,MovieTitles,return)</property>
                    <property name="list">MovieTitles</property>
                    <property name="submenuVisibility">movies</property>
                    <property name="group">mainmenu</property>
                    <property name="hasSubmenu">False</property>
                </item>
                <item id="2">
                    <property name="id">$NUMBER[2]</property>
                    <label>$LOCALIZE[31334]</label>
                    <label2>Common menu item</label2>
                    <icon>home_icons/trailers.png</icon>
                    <thumb />
                    <property name="labelID">plugin.video.itunes_trailers</property>
                    <property name="defaultID">trailers</property>
                    <property name="background">home\trailers\</property>
                    <property name="backgroundName">31334</property>
                    <visible>System.HasAddon(plugin.video.itunes_trailers)</visible>
                    <onclick>ActivateWindow(Videos,plugin://plugin.video.itunes_trailers,return)</onclick>
                    <property name="path">ActivateWindow(Videos,plugin://plugin.video.itunes_trailers,return)</property>
                    <property name="list">plugin://plugin.video.itunes_trailers</property>
                    <property name="submenuVisibility">plugin-video-itunes-trailers</property>
                    <property name="group">mainmenu</property>
                    <property name="hasSubmenu">False</property>
                </item>
                <item id="3">
                    <property name="id">$NUMBER[3]</property>
                    <label>$LOCALIZE[10004]</label>
                    <label2>Common menu item</label2>
                    <icon>home_icons/settings.png</icon>
                    <thumb />
                    <property name="labelID">settings</property>
                    <property name="defaultID">settings</property>
                    <property name="background">home\settings\</property>
                    <property name="backgroundName">10004</property>
                    <onclick>ActivateWindow(Settings)</onclick>
                    <property name="path">ActivateWindow(Settings)</property>
                    <property name="list">Settings</property>
                    <property name="submenuVisibility">settings</property>
                    <property name="group">mainmenu</property>
                    <property name="hasSubmenu">False</property>
                </item>
                <item id="4">
                    <property name="id">$NUMBER[4]</property>
                    <label>$LOCALIZE[13005]</label>
                    <label2>Common menu item</label2>
                    <icon>home_icons/shutdown.png</icon>
                    <thumb />
                    <property name="labelID">13005</property>
                    <property name="defaultID">shutdown</property>
                    <property name="background">home\shutdown\</property>
                    <property name="backgroundName">13005</property>
                    <onclick>ShutDown</onclick>
                    <property name="path">ShutDown</property>
                    <property name="list">ShutDown</property>
                    <property name="submenuVisibility">num-13005</property>
                    <property name="group">mainmenu</property>
                    <property name="hasSubmenu">True</property>
                </item>
            </content>
        </control>

    </controls>
</window>
Is that short enough to not need a paste bin link?

It could be that I missed a change to the skinning engine and I need to change the way I do it.

Any ideas?
Using two 2820FYKH0 Intel NUCs, a Revo 1600, and a Foxconn NT-330i - All running OpenELEC. :)
Reply
#2
Try to remove these from the itemlayouts:
Code:
<visible>[!String.IsEmpty(Container(9000).ListItem.Property(widget))] | [Control.HasFocus(8000)]</visible>

And add it to the list control itself.
My repo
GitHub
Embuary Skin

Any help to stay motivated is welcome: Put some in my tip jar for my daughter :)
Reply
#3
Thanks for the suggestion sualfred, but I know I can make them display in different ways, that's not really the issue, the problem is that it used to work correctly pre-Leia in 17.
I'm just trying to find out if it's a bug or just the way it's going to work now.

It's used a lot in Metropolis and I have no problem re-writing all the calls if I have to, but only if I have to.
Case in point, this:
Code:
    <variable name="GlobalWidgetLabel">
        <value condition="String.IsEqual(Container(9000).ListItem.Property(widgetType), movies)">$INFO[ListItem.Title]$INFO[ListItem.Year, (,)]</value>
        <value condition="String.IsEqual(Container(9000).ListItem.Property(widgetType), episodes)">$INFO[ListItem.TVShowTitle] - $INFO[ListItem.Season]x$INFO[ListItem.Episode,,. ]$INFO[ListItem.Title]</value>
        <value condition="String.IsEqual(Container(9000).ListItem.Property(widgetType), albums)">$INFO[ListItem.Artist] - $INFO[ListItem.Title]$INFO[ListItem.Year, (,)]</value>
        <value condition="String.IsEqual(Container(9000).ListItem.Property(widgetType), songs)">$INFO[ListItem.Artist] - $INFO[ListItem.Title]</value>
        <value condition="String.IsEqual(Container(9000).ListItem.Property(widgetType), musicvideos)">$INFO[ListItem.Artist] - $INFO[ListItem.Title]</value>
        <!-- fixing the playlists content labels -->
        <value condition="String.IsEqual(Container(9000).ListItem.Property(widget), Playlist) + String.IsEmpty(Container(8000).ListItem.TVShowTitle)">$INFO[ListItem.Title]$INFO[ListItem.Year, (,)]</value>
        <value condition="String.IsEqual(Container(9000).ListItem.Property(widget), Playlist) + !String.IsEqual(ListItem.Title, ListItem.TVShowTitle) + !String.IsEmpty(Container(8000).ListItem.TVShowTitle)">$INFO[ListItem.TVShowTitle] - $INFO[ListItem.Season,,x]$INFO[ListItem.Episode,,. ]$INFO[ListItem.Title]</value>
        <!-- default -->
        <value>$INFO[ListItem.Label]</value>
    </variable>
is used inside list 8000 in the form of
Code:
                         <control type="label">
                            <label>$VAR[GlobalWidgetLabel]</label>
                        </control>    

And as I said before "Container(9000).ListItem.Property()" doesn't work for anything inside list 8000 so it will always display the default label.

Is it a bug?
Using two 2820FYKH0 Intel NUCs, a Revo 1600, and a Foxconn NT-330i - All running OpenELEC. :)
Reply
#4
A better way to demonstrate the issue is like this.

If I put this inside the <focusedlayout> portion of the list 8000:
Code:
<label>$INFO[Container(9000).ListItem.Property(submenuVisibility)]</label>

This is what it displays, the blue bar is where it should be. It should say "movies" but it's blank.

Image
Using two 2820FYKH0 Intel NUCs, a Revo 1600, and a Foxconn NT-330i - All running OpenELEC. :)
Reply
#5
Have you checked this thread?

330696 (thread)
Reply
#6
(2018-12-05, 08:40)Hitcher Wrote: Have you checked this thread?

330696 (thread)
 I did, but figured it was too old to be relevant, but the timeline fits for when it broke. I checked as far back as I could (18 alpha 1) and it worked there, but was broken by alpha 2. I can't find any nightlies for the time frame in between to give an exact date when t was broken (they only go back to Oct 2018). Alpha1 was for March 2018 and Alpha2 was June 2018. I'll do the homework to give an exact date when it was broken but can't without access to the nightlies for that time period.
Using two 2820FYKH0 Intel NUCs, a Revo 1600, and a Foxconn NT-330i - All running OpenELEC. :)
Reply
#7
Still broken in RC3 FYI.
Using two 2820FYKH0 Intel NUCs, a Revo 1600, and a Foxconn NT-330i - All running OpenELEC. :)
Reply
#8
Still broken in RC5.2 FYI. It stopped working between Alpha1 and Alpha2.
Using two 2820FYKH0 Intel NUCs, a Revo 1600, and a Foxconn NT-330i - All running OpenELEC. :)
Reply
#9
Tried using -

<label>$INFO[ListItem.Property(submenuVisibility)]</label>
Reply
#10
It's more about the fact that this doesn't work either because of whatever has changed.
Code:
<value condition="String.IsEqual(Container(9000).ListItem.Property(widgetType), movies)">$INFO[ListItem.Title]$INFO[ListItem.Year, (,)]</value>

The first issue I described is annoying but I could work around it, but there is no way around these not working correctly.
Code:
    <variable name="GlobalWidgetLabel">
        <value condition="String.IsEqual(Container(9000).ListItem.Property(widgetType), movies)">$INFO[ListItem.Title]$INFO[ListItem.Year, (,)]</value>
        <value condition="String.IsEqual(Container(9000).ListItem.Property(widgetType), episodes)">$INFO[ListItem.TVShowTitle] - $INFO[ListItem.Season]x$INFO[ListItem.Episode,,. ]$INFO[ListItem.Title]</value>
        <value condition="String.IsEqual(Container(9000).ListItem.Property(widgetType), albums)">$INFO[ListItem.Artist] - $INFO[ListItem.Title]$INFO[ListItem.Year, (,)]</value>
        <value condition="String.IsEqual(Container(9000).ListItem.Property(widgetType), songs)">$INFO[ListItem.Artist] - $INFO[ListItem.Title]</value>
        <value condition="String.IsEqual(Container(9000).ListItem.Property(widgetType), musicvideos)">$INFO[ListItem.Artist] - $INFO[ListItem.Title]</value>
        <!-- fixing the playlists content labels -->
        <value condition="String.IsEqual(Container(9000).ListItem.Property(widget), Playlist) + String.IsEmpty(Container(8000).ListItem.TVShowTitle)">$INFO[ListItem.Title]$INFO[ListItem.Year, (,)]</value>
        <value condition="String.IsEqual(Container(9000).ListItem.Property(widget), Playlist) + !String.IsEqual(ListItem.Title, ListItem.TVShowTitle) + !String.IsEmpty(Container(8000).ListItem.TVShowTitle)">$INFO[ListItem.TVShowTitle] - $INFO[ListItem.Season,,x]$INFO[ListItem.Episode,,. ]$INFO[ListItem.Title]</value>
        <!-- default -->
        <value>$INFO[ListItem.Label]</value>
    </variable>

It's like I described in the other thread, there is no access to the container anymore. String.IsEqual(Container(9000).ListItem.Property(widgetType) is always empty after the changes between Alpha1 and Alpha2.
Using two 2820FYKH0 Intel NUCs, a Revo 1600, and a Foxconn NT-330i - All running OpenELEC. :)
Reply
#11
(2019-01-14, 06:07)MacGyver Wrote:
Code:
    <variable name="GlobalWidgetLabel">
        <value condition="String.IsEqual(Container(9000).ListItem.Property(widgetType), movies)">$INFO[ListItem.Title]$INFO[ListItem.Year, (,)]</value>
        <value condition="String.IsEqual(Container(9000).ListItem.Property(widgetType), episodes)">$INFO[ListItem.TVShowTitle] - $INFO[ListItem.Season]x$INFO[ListItem.Episode,,. ]$INFO[ListItem.Title]</value>
        <value condition="String.IsEqual(Container(9000).ListItem.Property(widgetType), albums)">$INFO[ListItem.Artist] - $INFO[ListItem.Title]$INFO[ListItem.Year, (,)]</value>
        <value condition="String.IsEqual(Container(9000).ListItem.Property(widgetType), songs)">$INFO[ListItem.Artist] - $INFO[ListItem.Title]</value>
        <value condition="String.IsEqual(Container(9000).ListItem.Property(widgetType), musicvideos)">$INFO[ListItem.Artist] - $INFO[ListItem.Title]</value>
        <!-- fixing the playlists content labels -->
        <value condition="String.IsEqual(Container(9000).ListItem.Property(widget), Playlist) + String.IsEmpty(Container(8000).ListItem.TVShowTitle)">$INFO[ListItem.Title]$INFO[ListItem.Year, (,)]</value>
        <value condition="String.IsEqual(Container(9000).ListItem.Property(widget), Playlist) + !String.IsEqual(ListItem.Title, ListItem.TVShowTitle) + !String.IsEmpty(Container(8000).ListItem.TVShowTitle)">$INFO[ListItem.TVShowTitle] - $INFO[ListItem.Season,,x]$INFO[ListItem.Episode,,. ]$INFO[ListItem.Title]</value>
        <!-- default -->
        <value>$INFO[ListItem.Label]</value>
    </variable>
You have typo in this code you have empty before string, remove blank(empty space) and try if this working.
"empty"movies
"empty"episodes
"empty"albums
"empty"songs
......

Also try insted "String.IsEqual" to use "String.Contains"
try to use like this, asume that is container info ?!?
Code:
    <variable name="GlobalWidgetLabel">
        <value condition="String.Contains(Container(9000).ListItem.Property(widgetType), movies)">$INFO[Container(8000).ListItem.Title]$INFO[Container(8000).ListItem.Year, (,)]</value>
XBoxMediaCenter (Kodi Leia) 18.0 , LibreElec RasPi3 Libreelec-Leia Skin AeonMQ6
Reply
#12
None of them will work because Container(9000).ListItem.Property(?) is always blank.

As in even this:
Code:
    <variable name="GlobalWidgetLabel">
        <value>$INFO[Container(9000).ListItem.Property(widgetType)]</value>
    </variable>
is blank.

Kodi never cared about the space before, and all of it worked perfectly fine in Alpha1 and then never again.

Like I mentioned in the other thread.
It works here
Code:
                <control type="image">
                    <visible>String.IsEqual(Container(9000).ListItem.Property(submenuVisibility),movies)</visible>
                </control>
but it doesn't work in any control inside this control
Code:
                <control type="list" id="8000">
                    <control
                        <visible>String.IsEqual(Container(9000).ListItem.Property(submenuVisibility),movies)</visible>
                    </control>
                </control>



Thanks for at least looking at it, but Metropolis isn't the only skin that uses this. From what I can tell so does Aeon Nox, SIO2, Adonic, and Mimic. Those are just the ones I have installed I'm sure others may be broken too.
Using two 2820FYKH0 Intel NUCs, a Revo 1600, and a Foxconn NT-330i - All running OpenELEC. :)
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Leia Bug? related to ListItem.Property() in other control lists00