substring recently added matching
#1
Just playing around with this concept:

Image

Now I can get it to sort of work, the episode shows and I can click to watch:

Image

My code is:

PHP Code:
<control type="group">
<
visible>substring(ListItem.Label,psych)</visible>
    <
control type="button" id="16374">
        <
onleft>52</onleft>
        <
onright>52</onright>
        <
onup>52</onup>
        <
ondown>52</ondown>
        <
label></label>
        <
onclick>PlayMedia($INFO[Window(Home).Property(LatestEpisode.1.Path)])</onclick>
        <
visible allowhiddenfocus="true">false</visible>
    </
control>
    <
control type="label">
        <
posx>1000</posx>
        <
posy>500</posy>
        <
width>570</width>
        <
height>50</height>
        <
aligny>center</aligny>
        <
font>Font_TVShow</font>
        <
textcolor>ff67ffff</textcolor>
        <
label>$INFO[Window(Home).Property(LatestEpisode.1.ShowTitle)]</label>
    </
control>
    <
control type="image">
        <
posx>1000</posx>
        <
posy>560</posy>
        <
width>200</width>
        <
height>100</height>
        <
texture>$INFO[Window(Home).Property(LatestEpisode.1.Thumb)]</texture>
    </
control>
</
control

But I have to manually type in the show name to match - substring(ListItem.Label,psych). Is there anyway I could get the substring matching to be more automatic?
Image

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
Reply
#2
I don't get what you're trying to achieve?

Playing recently added episodes?
Reply
#3
End result I would much rather have Recently added for TV work more like that abc player picture.

I was playing around seeing how far I can get without actually having to learn Python. I'm pretty close - the recent episode wont show till I reach "Psych" (the lower right image is the most recent episode) - but cant think of a way to automatically match a show without typing the actual name:

<visible>substring(ListItem.Label,showname)</visible>
Image

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
Reply
#4
Looks like what I was really after was comparing a $INFO to a $INFO. This solved question:

Quote:<visible>StringCompare(Window(Home).Property(LatestEpisode.1.ShowTitle),ListItem.Label)</visible>

Now to see how far I can take this....
Image

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
Reply
#5
mcborzu Wrote:Looks like what I was really after was comparing a $INFO to a $INFO. This solved question:



Now to see how far I can take this....

Would there be a way to do this for each show?

For example, highlight a show and the image change to the most recent episode for that show?
Image
To learn more, click here.
Reply
#6
igotdvds Wrote:Would there be a way to do this for each show?

For example, highlight a show and the image change to the most recent episode for that show?

Yea end goal is to mimic that ABC player, atleast for me right now I'm trying to space out what happens if you have 6 matches plus the button navigation...Plus just seeing if this causes any sluggish UI response...
Image

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
Reply
#7
mcborzu Wrote:Yea end goal is to mimic that ABC player, atleast for me right now I'm trying to space out what happens if you have 6 matches plus the button navigation...Plus just seeing if this causes any sluggish UI response...

What about when the most recent episodes 1-8 are all from the same show?
Image
To learn more, click here.
Reply
#8
In my test screen I'm only doing 4 shows, so if it hits 4 positive matches it will show that TV shows 4 recent shows. If 2 positive matches then 2 recent shows. This is all using the info from the recentlyadded script....
Image

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
Reply
#9
mcborzu Wrote:<visible>StringCompare(Window(Home).Property( LatestEpisode.1.ShowTitle),ListItem.Label)</visible>

This doesn't work at all for me. What am I doing wrong? Huh
Reply
#10
When trying to find out why certain conditions don't work I add labels to display the info I'm using. So in your case I'd add the following two labels -

PHP Code:
<control type="label">
    ...
    <
label>$INFO[Window(Home).Property(LatestEpisode.1.ShowTitle)]</label>
</
control

PHP Code:
<control type="label">
    ...
    <
label>$INFO[ListItem.Label]</label>
</
control
Reply
#11
That's the thing Hitcher, I get the same show name when I fail proof. Thanks for your input though. My only conclusion is that I must be doing something wrong with my StringCompare.

You can see a small piece of my code below.


PHP Code:
                <item id="1">

                    <
visible>StringCompare(ListItem.Label,ListItem.Label2)</visible>  

                
                    <
label>$INFO[Window(Home).Property(LatestEpisode.1.ShowTitle)]</label>
                    <
label2>$INFO[Container(50).ListItem.Label]</label2>
                    <
icon>$INFO[Window(Home).Property(LatestEpisode.1.Thumb)]</icon>
                    <
onclick>$INFO[Window(Home).Property(LatestEpisode.1.Path)]</onclick>
                </
item

Maybe I should explain a bit. The two labels are only there to see if it's the correct show and won't be visible for the user.
Reply
#12
you need to use $INFO for the second label i believe, if not we have no idea if you're comparing to the literal string or not.
Reply
#13
spiff Wrote:you need to use $INFO for the second label i believe, if not we have no idea if you're comparing to the literal string or not.

PHP Code:
<visible>StringCompare(Container(50).ListItem.Label,True Blood)</visible>
... 

PHP Code:
<visible>StringCompare(Window(Home).Property(LatestEpisode.1.ShowTitle),True Blood)</visible


The two lines above by themselfs work, but when I try to put them together:


PHP Code:
<visible>StringCompare(Container(50).ListItem.Label,Window(Home).Property(LatestEpisode.1.ShowTitle))</visible>
... 

or

PHP Code:
<visible>StringCompare(Container(50).ListItem.Label,$INFO[Window(Home).Property(LatestEpisode.1.ShowTitle)])</visible>
... 


It doesn't work.
Reply
#14
Tried this?

PHP Code:
<visible>StringCompare(Container(50).ListItem.Label,Container(50)ListItem.Label2)</visible
Reply
#15
I tried it out but it's unfortunately not working either.
Reply

Logout Mark Read Team Forum Stats Members Help
substring recently added matching0