A couple of quick questions
#1
Hoping that somebody can point me in the right direction to solve this one:-

So I've added duration and mpaa ratings directly following the plot on my epg screen, both of which work, but for the mpaa ratings the result is sometimes blank because it does not exist when being scraped. Under normal circumstances I would use a fallback (Unknown) if no entry was found, but can't really figure out how to achieve this action when using multiple controls together like I've done below:-

PHP Code:
<label>$INFO[ListItem.Plot]  [COLOR white]Duration: [/COLOR][COLOR cornflowerblue$INFO[ListItem.DurationHrs/Min[/COLOR]   [COLOR white]Rating: [/COLOR][COLOR cornflowerblue]$INFO[Window(Home).Property(SkinHelper.ListItem.MPAA)][/COLOR]</label


Hope it makes sense what I'm trying to achieve here. To be honest, I'm not even entirely sure this is really right way to do things in the first instance, but any help would be very much appreciated.
Cheers
Reply
#2
Best approach is to use variables for each item.

You need to put variables in an Includes file. In Estuary there is one called variables.xml
Alternatively you can put them in Includes.xml

In the includes file you want something like this:
Code:
<variable name="Label_MPAA">
    <value condition="!String.IsEmpty(Window(Home).Property(SkinHelper.ListItem.MPAA))">$INFO[Window(Home).Property(SkinHelper.ListItem.MPAA)]</value>
    <value>Your Fallback Label</value>
</variable>

And then in your label you would reference it like so:
Code:
<label>$INFO[ListItem.Plot]  [COLOR white]Duration: [/COLOR][COLOR cornflowerblue] $INFO[ListItem.Duration] Hrs/Min[/COLOR]   [COLOR white]Rating: [/COLOR][COLOR cornflowerblue]$VAR[Label_MPAA][/COLOR]</label>

Also, with your Duration I recommend putting the Hrs/Min inside the tag like so:
Code:
$INFO[ListItem.Duration,, Hrs/Min]

That way the Hrs/Min label will only show if ListItem.Duration has something in it (text after the first comma will be placed before the infolabel and text after the second comma will be placed after the infolabel)
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#3
That's great.....Smile
I will give this a try. Really helpful info.
Thanks very much Smile

Edit: Works fine now and exactly what I was trying to achieve.....Happy Chappy! Smile
Reply

Logout Mark Read Team Forum Stats Members Help
A couple of quick questions0