Fallback Texture / Image?
#1
Question 
I have some code which is displaying a texture for items in a list, in the following manner:

Code:
<texture>$INFO[ListItem.Label,,_icon.png]</texture>

What I would like is that if the texture does not find a relevant image then it could load a fallback image. Jezz mentioned to me in passing that fallback attribute of the texture tag may work but I tried the following without success:

Code:
<texture fallback="Default_icon.png">$INFO[ListItem.Label,,_icon.png]</texture>

Is something like this already available in XBMC and if so how? If it isn't available would it be possible at some point?

Thanks
Reply
#2
It loads the fallback texture only if the infolabel returns empty. It doesn't attempt to load the fallback if it can't find the texture.

I'm not sure whether it should or shouldn't to be honest - I can see arguments for both sides.
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
You can test for when the info is empty via the IsEmpty but there isn't a way to test if the texture exists or not is there?
Reply
#4
skunkm0nkee Wrote:You can test for when the info is empty via the IsEmpty but there isn't a way to test if the texture exists or not is there?

I think that would cover any side of the argument Nod
Reply
#5
jmarshall Wrote:It loads the fallback texture only if the infolabel returns empty. It doesn't attempt to load the fallback if it can't find the texture.

I'm not sure whether it should or shouldn't to be honest - I can see arguments for both sides.

I was trying to use a fallback if the texture file isn't available for the codec/studio stuff. Is there currently any way to handle this?

I think it would be useful if fallback does trigger if the file doesn't exist. If the information is just empty, then this can be handled by a isEmpty() visible condition.
Reply
#6
Add a ticket on trac describing the desired behaviour, and cc me.
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
#7
for the record, this functionality has been added to xbmc:
http://xbmc.svn.sourceforge.net/viewvc/x...sion=21336
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
#8
You're welcome - did I ever get a trac ticket btw?

Cheers,
Jonathan
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
#9
You're welcome - did I ever get a trac ticket btw?

Cheers,
Jonathan
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
#10
jmarshall Wrote:You're welcome - did I ever get a trac ticket btw?

Cheers,
Jonathan

yes: http://trac.xbmc.org/ticket/6776

And thank you very much for implementing it. Using it for TV show studio which falls back to generic HDTV/SDTV images if <studio>.png or <studio>_hd.png doesn't exist. Really nice Smile
Reply
#11
Thanks - now I can close it Smile
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

Logout Mark Read Team Forum Stats Members Help
Fallback Texture / Image?0