Boolean Condition on Skin.String
#1
I'm having a problem with a conditional visibility tag, so presume you cannot use a Skin.String in this way

Quote:<visible>substring(ListItem.Genre,$INFO[Skin.String(UsrDefGenre1)],Left)</visible>

I'm trying to set up some user defined genre groups eg 007Bond for such films & then get the associated icon to show up. Has anyone managed to do something similar
Noli illegitimi carborundum


Reply
#2
What does ListItem.Genre return?
Reply
#3
It's the normal return for a movie ie Action / Adventure / Comedy + whatever genres I've added to the movie through XWMM Movie Management.

The idea is to add a genre to a movie through XWMM etc + add the genre to a user defined list (UsrDefGenre1 to 5) & then the genre is to show up in the list of movies

The whole thing works except for the boolan parsing of UsrDefGenre1.
Noli illegitimi carborundum


Reply
#4
Well you're using left so the UsrDefGenre1 must be the first genre available to ListItem.Genre. Or just remove the left condition.
Reply
#5
Sorry I'm being a bit vague. In the first post I mentioned a genre called 007Bond, & this is the idea for a user defined genre that has been added to the movie. These would be enabled through a couple of views. Some views only show 1 genre icon & therefore the Left attribute, other views can show multiple genre icons and donot have the Left attribute.

Actually the value of UsrDefGenre1 was Action when I was testing & therefore should be true.

Here's the code
Quote:<control type="grouplist">
<visible>Control.IsVisible(729)</visible>
<description>Media Genre Flagging</description>
<posx>325</posx>
<posy>515</posy>
<width>625</width>
<align>right</align>
<itemgap>0</itemgap>
<orientation>horizontal</orientation>
<include>MultiMiniUsrDefGenre</include>
</control>

<include name="MultiMiniUsrDefGenre">
<control type="image">
<include>MultiGenreFlag</include>
<texture background="true" fallback="MovieUnknown.png">special://skin/icons/moviegenre/$INFO[Skin.String(UsrDefGenre1)].png</texture>
<visible>substring(ListItem.Genre,$INFO[Skin.String(UsrDefGenre1)])</visible>
</control>
<control type="image">
<include>MultiGenreFlag</include>
<texture background="true" fallback="MovieUnknown.png">special://skin/icons/moviegenre/$INFO[Skin.String(UsrDefGenre2)].png</texture>
<visible>substring(ListItem.Genre,$INFO[Skin.String(UsrDefGenre2)])</visible>
</control>

<!-- Upto 5 images -->

</include>
<include name="MultiGenreFlag">
<width>125</width>
<height>125</height>
<aspectratio aligny="bottom">keep</aspectratio>
<fadetime>IconCrossfadeTime</fadetime>
</include>
Noli illegitimi carborundum


Reply
#6
please see my comment in http://forum.xbmc.org/showthread.php?tid=110592
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

My previous forum/trac nickname: grajen3
Reply
#7
Maybe it's working without $INFO[] just like it's working for ListItem.
Image
Reply
#8
Thanks Guys

@`Black, I've tried removing the $INFO[] & still doesn't work.

@pieh Looking at your comment
Quote:"You can use $INFO but there is a catch: if You are using $INFO it will just convert $INFO[whatever here] to constant string when window is loading and will always compare to that constant string"
I'm happy for it to be a constant it's a Skin.String(label). IMO it should work.

Hard codeing the genre Action works - <visible>SubString(ListItem.Genre,Action)</visible>

Setting the word Action as a language string works - <visible>substring(ListItem.Genre,$LOCALIZE[35300])</visible>

I've even checked guisettings.xml and the Skin.String(label) is there <setting type="string" name="skin.convergence.usrdefgenre1">Action</setting>
Noli illegitimi carborundum


Reply
#9
right, I missread problem - can You provide me some sample to reproduce it?
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

My previous forum/trac nickname: grajen3
Reply
#10
Sure - I have to go back to work soon, but will whip up something simple for Confluence later tonight or tomorrow am.
Noli illegitimi carborundum


Reply
#11
I have not the same but a similar problem. Inside a container I use

$INFO[Skin.String(MusicGenres.Path)]$INFO[ListItem.Label,,.jpg]

for a texture. The string is set to "musicgenres/" but only the fallback is shown. If I use

musicgenres/$INFO[ListItem.Label,,.jpg]

it's working. Maybe a bug with Skin.String infolabel?
Image
Reply
#12
oh, using non ListItem $INFO might not work inside of container - will need to check that, but I think I remember something similiar issue now
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

My previous forum/trac nickname: grajen3
Reply
#13
pieh - if you still want a sample, Try adding below to ViewsAddonInfoBrowser.xml & make sure you have the first video submenu addon enabled, I used youtube.

Sorry this was a bit of a rush as a Rugby game got in the way & now I'm late for work, but should work

PHP Code:
<!--################################################# 
Confluence ViewsAddonBrowser.xml AddonInfoListView1 Line 241
-->
                
<!--
control type="textbox">
    <
description>Description</description>
    <
posx>10</posx>
    <
posy>100</posy>
    <
width>490</width>
    <
height>180</height>
    <
font>font12</font>
    <
align>justify</align>
    <
textcolor>white</textcolor>
    <
label>$INFO[ListItem.Property(Addon.Description)]</label>
    <
autoscroll time="2000" delay="3000" repeat="5000">Skin.HasSetting(AutoScroll)</autoscroll>
    </
control-->

<
control type="label">
    <
posx>-600</posx>
    <
posy>120</posy>
    <
width>950</width>
    <
height>30</height>
    <
font>font14caps_title</font>
    <
textcolor>white</textcolor>
    <
label>( $INFO[ListItem.Label] ) Checking  for - $INFO[Skin.String(HomeVideosButton1)]</label>
</
control>                
<
control type="label">
    <
posx>-600</posx>
    <
posy>140</posy>
    <
width>950</width>
    <
height>60</height>
    <
font>font50caps_title</font>
    <
textcolor>yellow</textcolor>
    <
label>FOUND $INFO[ListItem.Label]</label>
    <
visible>SubString(ListItem.Label,$INFO[Skin.String(HomeVideosButton1)])</visible>
</
control>            
<
control type="label">
    <
posx>-600</posx>
    <
posy>140</posy>
    <
width>950</width>
    <
height>60</height>
    <
font>font50caps_title</font>
    <
textcolor>blue</textcolor>
    <
label>NOT FOUND $INFO[Skin.String(HomeVideosButton1)]</label>
    <
visible>!SubString(ListItem.Label,$INFO[Skin.String(HomeVideosButton1)])</visible>
</
control>
<!-- 
####################################################### --> 


Edit Too much of a hurry & on my way to work realised above code will never return true, would have to search for
Quote:$INFO[system.addontitle(Skin.String(HomeVideosButton1))]
Noli illegitimi carborundum


Reply

Logout Mark Read Team Forum Stats Members Help
Boolean Condition on Skin.String0