parameter to show listitem is a movie set?
#1
i would like to add an icon to show that an entry in the movie library is a movie set. does anyone know if this is possible, and if so, how?. Obviously a visible tag on the image control, but what is the parameter to use? i couldnt find it in the wiki or by searching.

thanks.
Reply
#2
Yeah snap as i cant find anything to display an image or label based on it being a collection.
Reply
#3
>ListItem.IsFolder + Container.Content(movies)<
Reply
#4
Nice, thanks. I assumed that refered to an actual folder but I guess that's how xbmc treats movie sets. I'll give it a shot later.
Reply
#5
in case it results in a false positive when the 'up/back' enrty is selected, you can extend the visible condition to:
>ListItem.IsFolder + Container.Content(movies) + !stringcompare(ListItem.Label,..)<
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#6
Thanks for the help. I've given it a try but it's not quite working as expected.

I've added an image control to each of the itemlayout and focused section of a panel view. The visible condition is as above (i've also tried variations). The focus image works fine, you focus on a movie set and the image shows up, no problem. The image is not there when you focus on an item that isn't a movie set.

However, the itemlayout (i.e. the non-focused items) image only shows up when the focused item is a movie set. I.e. The rest of the panel items don't have the image (even movie sets), until you focus on a movie set, then they all have the image. Obviously the ListItem.IsFolder property is being populated from the currently selected item, not the item in whose itemlayout section the image is located.

As a bit of a noob, I've blindly tried various things, such as adding INFO$[...] around the listitem, but since I don't know what half of this stuff does, it didn't work.

Is the Listitem.IsFolder only usable on the currently selected item in a list? Or is there some way to switch it to use the listitem.isfolder condition of the unfocused item?

If I'm not explaining myself properly, apologies. i'm away from my computer at the moment, so can't post screenshots. I can when I get home tonight though.

Thanks in advance.
Reply
#7
Just in case I didn't explain things properly:

Code:

Code:
<control type="panel" id="513">
    <posx>16</posx>
    <posy>36</posy>
    <width>1264</width>
    <height>648</height>
    <onleft>4</onleft>
    <onright>513</onright>
    <onup>513</onup>
    <ondown>513</ondown>
    <viewtype label="Wallstream">panel</viewtype>
    <pagecontrol>60</pagecontrol>
    <scrolltime>200</scrolltime>
    <preloaditems>200</preloaditems>
    <visible>![Window.IsVisible(VideoLibrary) + Container.Content(TVShows)]</visible>
    <itemlayout height="216" width="156">
        <control type="image">
            <posx>0</posx>
            <posy>18</posy>
            <width>149</width>
            <height>192</height>
            <bordersize>2</bordersize>
            <aspectratio>stretch</aspectratio>
            <fadetime>200</fadetime>
            <texture background="true" >$INFO[Listitem.Icon]</texture>
        </control>
        <control type="image">
            <posx>0</posx>
            <posy>0</posy>
            <width>156</width>
            <height>216</height>
            <bordersize>2</bordersize>
            <aspectratio>stretch</aspectratio>
            <fadetime>200</fadetime>
            <texture background="true">$INFO[ListItem.videoresolution]case.png</texture>
        </control>
[b]        <control type="image">
            <visible>ListItem.IsFolder + Container.Content(movies) + !stringcompare(ListItem.Label,..)</visible>
            <aspectratio>keep</aspectratio>
            <posx>106</posx>
            <posy>-1</posy>
            <width>35</width>
            <height>22</height>
            <fadetime>200</fadetime>
            <texture background="true">MovieSet.png</texture>
        </control>    [/b]    
    </itemlayout>
    <focusedlayout height="323" width="225">
        <control type="group">    
            <posx>0</posx>
            <posy>0</posy>
                <animation effect="slide" end="30,0" time="200" reversible="true" condition="Container.Column(0)">conditional</animation>
                <animation effect="slide" end="0,34" time="200" reversible="true" condition="Container.Row(0)">conditional</animation>
                <animation effect="slide" end="0,-37" time="200" reversible="true" condition="Container.Row(2)">conditional</animation>
                <animation effect="slide" end="-28,0" time="200" reversible="true" condition="Container.Column(7)">conditional</animation>
            <animation reversible="false" effect="zoom"  end="-27,-33,300,425" time="200">focus</animation>
            <animation reversible="false" effect="zoom" start="-27,-33,300,425" time="200">unfocus</animation>            
            <control type="image">
                <posx>0</posx>
                <posy>18</posy>
                <width>150</width>
                <height>192</height>
                <aspectratio>stretch</aspectratio>
                <fadetime>200</fadetime>
                <texture background="true">$INFO[Listitem.Icon]</texture>
            </control>
            <control type="image">
                <posx>0</posx>
                <posy>0</posy>
                <width>156</width>
                <height>216</height>
                <aspectratio>stretch</aspectratio>
                <fadetime>200</fadetime>
                <texture background="true">$INFO[ListItem.videoresolution]case.png</texture>
            </control>
            <control type="image">
                <visible>ListItem.IsFolder + Container.Content(movies) + !stringcompare(ListItem.Label,..)</visible>
                <aspectratio>keep</aspectratio>
                <posx>106</posx>
                <posy>-1</posy>
                <width>35</width>
                <height>22</height>
                <fadetime>200</fadetime>
                <texture background="true">MovieSet.png</texture>
            </control>
        </control>
    </focusedlayout>
</control>


The image in focusedlayout works fine, shows when you focus on the movie set. But when I add the image control to itemlayout, it does this:

No image on any items when a non-set item is selected:
Image

Image appears on every item when a movie set is selected:
Image

Anyone know how to fix it?
Reply
#8
Here's your answer -
Quote:stringcompare(info,string)

Returns true if the info equals the string. example of info: ListItem.Title, ListItem.Genre. Please note that string can also be a $LOCALIZE[] or info label. Also note that in a panelview or similar this only works on the focused item.
stringcompare only works for the focused item which is why when you select one it shows on all non-focused items.
Reply
#9
The only reason that stringcompare is there is to avoid a false positive on the parent folder icon. So I took it out when I was testing and it still happened. I took the visible condition right back to just listitem.isfolder and it still happened. So the listitem.isfolder must only apply to the selected item, same as the stringcompare. Weird, because other listitem objects work on the non-focused items, e.g. Listitem.label. Is it because it's a Boolean, not a string?

Has anyone got this to work elsewhere? Or has anyone seen a skin or mod where this works?

If not I guess an icon that pops up when the set is focused is ok, but not as nice as having it there when unfocused too.
Reply
#10
Isfolder also only works on the focused item
Reply
#11
aphillippe Wrote:Has anyone got this to work elsewhere?

now that you mention it, i did some tests with the ListItem.IsFolder boolean when it was added to SVN and i ran into exactly the same issue.

no clue if this is intended behavior or not?

another issue i'm seeing, if you use it only in the focused layout, the icon will pop up for a fraction of a second on non-folder items too.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#12
This is what i use and works fine i forgot i use this in Xperience_Common-View.xml well sort of to display the path on folders and the file sizes on files.

PHP Code:
<visible>IsEmpty(ListItem.foldername) + !substring(Container.Listitem.Label,..,left) + Container.Content(movies)</visible
Reply
#13
Thanks, that works a treat.
Reply

Logout Mark Read Team Forum Stats Members Help
parameter to show listitem is a movie set?0