[HELP] Fall back default image coding
#1
Previously I have had no trouble having a default image appear for my flagging when there isn't an icon to represent it. Lately I switch a few flags to use this...

<control type="image">
<posx>1175</posx>
<posy>399</posy>
<width>110</width>
<height>80</height>
<texture>defaultscreen.png</texture>
<visible>!Control.IsVisible(89)</visible>
</control>
<control type="image" id="89">
<posx>1175</posx>
<posy>399</posy>
<width>110</width>
<height>80</height>
<texture>$INFO[ListItem.VideoResolution,videoresolution,.png]</texture>
</control>

The default image will not show with this coding. can anyone shine some light on what I am missing.

I have 720, 540, 1080 as my icons.
Reply
#2
<texture fallback="foo">bar</texture>
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
Not sure if it's of any help, but here's some related info.
And a Trac Ticket for it.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#4
ekim232 Wrote:Previously I have had no trouble having a default image appear for my flagging when there isn't an icon to represent it. Lately I switch a few flags to use this...

<control type="image">
<posx>1175</posx>
<posy>399</posy>
<width>110</width>
<height>80</height>
<texture>defaultscreen.png</texture>
<visible>!Control.IsVisible(89)</visible>
</control>
<control type="image" id="89">
<posx>1175</posx>
<posy>399</posy>
<width>110</width>
<height>80</height>
<texture>$INFO[ListItem.VideoResolution,videoresolution,.png]</texture>
</control>

The default image will not show with this coding. can anyone shine some light on what I am missing.

I have 720, 540, 1080 as my icons.

I guess the code doesn't work because control '89' is always visible ?
Try this:
Code:
<control type="image">
    <posx>1175</posx>
    <posy>399</posy>
    <width>110</width>
    <height>80</height>
    <texture>defaultscreen.png</texture>
    <visible>!Control.IsVisible(89)</visible>
</control>
<control type="image" id="89">
    <posx>1175</posx>
    <posy>399</posy>
    <width>110</width>
    <height>80</height>
    <texture>$INFO[ListItem.VideoResolution,videoresolution,.png]</texture>
    [b]<visible>!IsEmpty(ListItem.VideoResolution)</visible>[/b]
</control>
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
because its only in very rare cases that "ListItem.VideoResolution" will be empty just because you don't have a graphic for it doesn't mean its empty

what you want is this (just 1 control)
Code:
<control type="image" id="89">
    <posx>1175</posx>
    <posy>399</posy>
    <width>110</width>
    <height>80</height>
    <texture fallback="defaultscreen.png">$INFO[ListItem.VideoResolution,videoresolution,.png]</texture>
</control>

At least in thoery Smile
Reply
#6
Jezz_X Wrote:because its only in very rare cases that "ListItem.VideoResolution" will be empty just because you don't have a graphic for it doesn't mean its empty

what you want is this (just 1 control)
Code:
<control type="image" id="89">
    <posx>1175</posx>
    <posy>399</posy>
    <width>110</width>
    <height>80</height>
    <texture fallback="defaultscreen.png">$INFO[ListItem.VideoResolution,videoresolution,.png]</texture>
</control>

At least in thoery Smile

correct, in theory it should work, but in real life it doesn't ;-)
problem is $INFO[ListItem.VideoResolution,videoresolution,.png] will never return empty.
even if ListItem.VideoResolution is empty, INFO[ListItem.VideoResolution,videoresolution,.png] will still return 'videoresolution.png'
so it never loads the fallback image.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#7
Thanks for the suggestions. I tried yours Ronie and it was a no go. It all seems like it should work, but I guess I will have to wait for the trac ticket to be filled. For me it is not a big deal to add seperate image controls for sound, video, & codecs to have a fallback image....but for studios I think a single coding is great where it matched the names, but the drawback is the empty space with no fallback.
Reply
#8
ekim232 Wrote:Thanks for the suggestions. I tried yours Ronie and it was a no go. It all seems like it should work, but I guess I will have to wait for the trac ticket to be filled. For me it is not a big deal to add seperate image controls for sound, video, & codecs to have a fallback image....but for studios I think a single coding is great where it matched the names, but the drawback is the empty space with no fallback.

Sorry, i didn't test it myself. Anyway, maybe this would work:

Code:
<control type="image">
    <posx>1175</posx>
    <posy>399</posy>
    <width>110</width>
    <height>80</height>
    <texture>defaultscreen.png</texture>
[b]    <visible>IsEmpty(ListItem.VideoResolution)</visible>[/b]
</control>
<control type="image" id="89">
    <posx>1175</posx>
    <posy>399</posy>
    <width>110</width>
    <height>80</height>
    <texture>$INFO[ListItem.VideoResolution,videoresolution,.png]</texture>
[b]    <visible>!IsEmpty(ListItem.VideoResolution)</visible>[/b]
</control>
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#9
have a play with this code in theorySmile it will work

Code:
<control type="image">
    <posx>1175</posx>
    <posy>399</posy>
    <width>110</width>
    <height>80</height>
    <texture>defaultscreen.png</texture>
    <visible>!stringcompare(ListItem.VideoResolution,1080)+!stringcompare(ListItem.VideoResolution,720)+!stringcompare(ListItem.VideoResolution,540)</visible>
</control>
<control type="image" id="89">
    <posx>1175</posx>
    <posy>399</posy>
    <width>110</width>
    <height>80</height>
    <texture>$INFO[ListItem.VideoResolution,videoresolution,.png]</texture>
    <visible>stringcompare(ListItem.VideoResolution,1080)|stringcompare(ListItem.VideoResolution,720)|stringcompare(ListItem.VideoResolution,540)</visible>
</control>
Image
Reply

Logout Mark Read Team Forum Stats Members Help
[HELP] Fall back default image coding0