Thread Rating:
  • 0 Vote(s) - 0 Average
How do we use stringcompare for two labels?
#1
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?
Image
To learn more, click here.
Reply
#2
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]) 
Reply
#3
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.
Image
To learn more, click here.
Reply
#4
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]
Reply
#5
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>
Image
To learn more, click here.
Reply
#6
You need to put the actual number of the list control in the brackets.
Reply
#7
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>
Image
To learn more, click here.
Reply
#8
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.
Reply
#9
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?
Image
To learn more, click here.
Reply
#10
Well it will only do the compare when you load MyVideoNav.xml so more than likely.
Reply
#11
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?
Image
To learn more, click here.
Reply
#12
You can't get an include condition checked more than once when the window loads, instead you'll have to use a visible condition.
Reply
#13
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.
Image
To learn more, click here.
Reply
#14
Got it. Now users can pick the shows they want to enabled the prompt to delete for.

Image

--

Image

--

Image
Image
To learn more, click here.
Reply
#15
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!
Reply



Logout Mark Read Team Forum Stats Members Help
How do we use stringcompare for two labels?00