Kodi Community Forum

Full Version: How do we use stringcompare for two labels?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I need to do something like this:

Code:
stringcompare(Skin.String(Delete_Show_Number_1),ListItem.TVShowTitle)

Is this possible? I can get it to prove true if I set it to say:

Code:
stringcompare(Skin.String(Delete_Show_Number_1),Justified)

But I cant use an infolabel. Three hours later, I have no workaround. Anybody got an idea?
The second string needs to be formatted differently so XBMC knows it's info and not just a string.

PHP Code:
stringcompare(Skin.String(Delete_Show_Number_1),$INFO[ListItem.TVShowTitle]) 
Hitcher Wrote:The second string needs to be formatted differently so XBMC knows it's info and not just a string.

PHP Code:
stringcompare(Skin.String(Delete_Show_Number_1),$INFO[ListItem.TVShowTitle]) 

That doesnt work either.
Have you checked they're both actually the same by using two separate labels on screen?
Either that or you need to add the container ID -

$INFO[Container(n).ListItem.Label]
Hitcher Wrote:Have you checked they're both actually the same by using two separate labels on screen?
Either that or you need to add the container ID -

$INFO[Container(n).ListItem.Label]

They are the same label using:

Code:
<control type = "label">
                    <description>header label</description>
                    <posx>510</posx>
                    <posy>20</posy>
                    <width>700</width>
                    <height>30</height>
                    <font>Simplicity_40</font>
                    <label>$INFO[Skin.String(Delete_Show_Number_1)]</label>
                    <align>left</align>
                    <aligny>center</aligny>
                    <textcolor>white</textcolor>
                    <shadowcolor>black</shadowcolor>
                </control>
                <control type = "label">
                    <description>header label</description>
                    <posx>510</posx>
                    <posy>120</posy>
                    <width>700</width>
                    <height>30</height>
                    <font>Simplicity_40</font>
                    <label>$INFO[ListItem.TVShowTitle]</label>
                    <align>left</align>
                    <aligny>center</aligny>
                    <textcolor>white</textcolor>
                    <shadowcolor>black</shadowcolor>
                </control>

But when I compare them, I get nothing. I used:

Code:
<include condition="stringcompare(Skin.String(Delete_Show_Number_1),$INFO[Container().ListItem.TVShowTitle])">Delete_Eps</include>
You need to put the actual number of the list control in the brackets.
Hitcher Wrote:You need to put the actual number of the list control in the brackets.

Nope. This is driving me crazy!

Code:
<include condition="stringcompare(Skin.String(Delete_Show_Number_1),$INFO[Container(532).ListItem.TVShowTitle])">Delete_Eps</include>
Stick both those labels outside of everything else and see what they return.

EDIT: Only just noticed you're using this as an include condition which could be the problem because include conditions are only checked once on loading the current window.
Hitcher Wrote:Stick both those labels outside of everything else and see what they return.

EDIT: Only just noticed you're using this as an include condition which could be the problem because include conditions are only checked once on loading the current window.

I stuck them outside and they return the same values. You think its the include? Is there a workaround?
Well it will only do the compare when you load MyVideoNav.xml so more than likely.
Hitcher Wrote:Well it will only do the compare when you load MyVideoNav.xml so more than likely.

How could I get it to load more than once? Also, where would I have to put it, to make that stringcompare work?

Ok, this officially doesnt work! You cant copare two INFOs. I have displayed both of them on the screen and the compare always returns false?
You can't get an include condition checked more than once when the window loads, instead you'll have to use a visible condition.
Hitcher Wrote:You can't get an include condition checked more than once when the window loads, instead you'll have to use a visible condition.

Well on my way. Thanks Hitcher.
Got it. Now users can pick the shows they want to enabled the prompt to delete for.

Image

--

Image

--

Image
hi, im a complete noob in xbmc but i find this feature (auto delete) a must have, first thanks for all your work already done. I installed the skin and works very nice, the one thing i would love is the abillity to add ALL tv series (i have 66)i literally would pay for that!!! please take this into consideration, thanks again!