I was re-doing the flags and i ran into something.
i was using for example:
<texture>$INFO[Listitem.VideoCodec,flags/,.png]</texture>
and
<visible>!IsEmpty(Listitem.VideoCodec)</visible>
But if i do not have the flag image for some uncommon codec, then i get a gap in my horizontal grouplist.
So how do i check if the image exists?
PHP Code:
<control type="image" id="1">
[...]
<texture fallback=".">$INFO[Listitem.VideoCodec,flags/,.png]</texture>
<visible>!StringCompare(Control.GetLabel(1),.)</visible>
</control>
This doesn't work inside a list control but should work in a group list.
My grouplist does not like it. It's tripping out.
Am i here, am i there, idunno?
Code:
<control type="image" id="962">
<width>96</width>
<height>56</height>
<texture fallback="empty.png">$INFO[Listitem.VideoCodec,flags/,.png]</texture>
<aspectratio>keep</aspectratio>
<visible>!StringCompare(Control.GetLabel(962),empty.png)</visible>
</control>
Tried with and without using control coordinates on the grouplist, but same result.
Tried with the dot and with empty.png. Different id's ect. Keeps tripping out.
Nope. Needs !IsEmpty or it will always hide.
Is Control.Getlabel even available this way? It is off course in an include.
In the meantime, i made a pretty (Not Available) fallback image. N/A.png