Posts: 85
Joined: Aug 2011
Reputation:
1
Brain isn't working and I can't seem to locate an answer by searching.......
If I've got a multiimage command, how do I verify that the imagepath has images and if not would fallback to $INFO[ListItem.Property(Fanart_Image)]?
Probably easy but I'm not seeing the solution.
Posts: 6,684
Joined: Mar 2009
Reputation:
147
phil65
Retired Team-Kodi Member
Posts: 6,684
2012-09-13, 02:53
(This post was last modified: 2012-09-13, 02:54 by phil65.)
this works I think, but only outside of containers:
give multiimage control (here in this example showin extrafanart) an id and then for the fanart
<visible>!SubString(Control.getLabel(8870),extrafanart)</visible>
Posts: 1,126
Joined: Mar 2012
Reputation:
37
MassIV
Skilled Skinner
Posts: 1,126
Maybe if you can check for the existence of the file extension? With something like:
condition="SubString(ListItem.FileExtension,png)"
[RELEASE] Metroid
[RELEASE] IrcChat
Posts: 85
Joined: Aug 2011
Reputation:
1
2012-09-16, 03:34
(This post was last modified: 2012-09-16, 03:59 by adrian ballard.)
OK, I've gone round and round with this for a couple of days now and it's driving me nuts!!
I've yet to find a good solution to a very simple problem:
If I define a multiimage, how to check if the folder exists and/or that it contains images?
What we need is something like:
<visible>IsEmpty(imagepath)</visible>
Where imagepath is not the actual path string but if the folder has ANYTHING in it.
Yes, there's a workaround to a point but it's not a true evaluation of the condition and prevents the skin from being really smooth.
ie: I place a fallback image under the multiimage- works BUT introduce a fade and the underlying image becomes visible for a split second as the images change.
So, is it at all possible to add this in?
If not, how about being able to define a fallback? That would work just as well.
Could someone point me in a direction to achieve this?
Sorry but I'm a perfectionist and like I said, it's really bugging me.
Please and thank you.....
PS: I'm much more bald than I was a few days ago...
Posts: 85
Joined: Aug 2011
Reputation:
1
Fair enough.
If we could just get it on the radar I'd be happy with that.
TBH: I can't believe this hasn't come up before as visual appeal is just as important as functionality.
my 0.02
Posts: 5,292
Joined: Jun 2006
Reputation:
62
Jezz_X
Team-XBMC Skinner
Posts: 5,292
the reason is not in and it has been discussed many times is too do with the way that info labels work in xbmc. Basically the are polled every frame and checked. And doing file system checks sixty times a second is not a great idea there had been discussion on how too change it but no one had really stepped up to code it in as its a huge under lying change to everything
Posts: 26,215
Joined: Oct 2003
Reputation:
187
One thing that might be doable is to reset the path (i.e. so that control.getlabel returns empty) if the directory load fails. I don't have time to look at it though (the same could be done for images - can't recall offhand if it does it or not).
Posts: 26,215
Joined: Oct 2003
Reputation:
187
All they need to know is if the multi image has anything in it, right?
Posts: 85
Joined: Aug 2011
Reputation:
1
2012-09-18, 16:54
(This post was last modified: 2012-09-18, 20:10 by adrian ballard.)
yes, at the very least, please.
so that this
<visible>!IsEmpty(Control.GetLabel(multiimage_id))</visible>
will work correctly