multiimage question
#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.
Reply
#2
don't think you can
Reply
#3
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>
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#4
kinda like this?

Code:
<control type="image" description="fanart">
    <visible>!Control.IsVisible(987654)</visible>
    <texture background="true">$INFO[ListItem.Property(Fanart_Image)]</texture>
</control>
<control type="multiimage" id="987654" description="fanart">
    <imagepath background="true">$INFO[ListItem.Path,,extrafanart]</imagepath>
</control>

Works just fine except for 1 issue:
How to test that <imagepath background="true">$INFO[ListItem.Path,,extrafanart]</imagepath> actually has images?
Reply
#5
Maybe if you can check for the existence of the file extension? With something like:
condition="SubString(ListItem.FileExtension,png)"
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#6
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...
Reply
#7
(2012-09-16, 03:34)adrian ballard Wrote: 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...

it just isn´t possible in a really nice way atm.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#8
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
Reply
#9
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
Reply
#10
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).
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
#11
@jmarshall
control.getlabel will return path to current image, so if there are no image it will stay empty. I think problem here is that there is no way to determine if we are past directory loading or not as before/after directory loading control.getlabel will stay empty. So using <visible>!IsEmpty(Control.GetLabel(multiimage_id))</visible> for fallback image is not accurate as it will show control before loading dir.
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

My previous forum/trac nickname: grajen3
Reply
#12
All they need to know is if the multi image has anything in it, right?
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
#13
yes, at the very least, please.

so that this
<visible>!IsEmpty(Control.GetLabel(multiimage_id))</visible>
will work correctly
Reply
#14
(2012-09-18, 16:54)adrian ballard Wrote: yes, at the very least, please.

so that this
<visible>!IsEmpty(Control.GetLabel(multiimage_id))</visible>
will work correctly
it works http://trac.xbmc.org/ticket/10069 - if not explain what exactly doesn't work
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

My previous forum/trac nickname: grajen3
Reply
#15
Example 1: This won't work as my understanding is the fallback image must be a fixed image.
Code:
<control type="multiimage">
    <posx>0</posx>
    <posy>0</posy>
    <width>1920</width>
    <height>1080</height>
    <aspectratio>stretch</aspectratio>
    <randomize>true</randomize>
    <timeperimage>5000</timeperimage>
    <fadetime>250</fadetime>
    <imagepath background="true" fallback="$INFO[ListItem.Property(Fanart_Image)]">$INFO[ListItem.Path,,/extrafanart/]</imagepath>
</control>

Example 2: (999999) should only be visible if the extrafanart folder for (987654) is empty. Instead, (999999) is always visible whether the extrafanart folder for (987654) is empty or not.
Code:
<control type="multiimage" id="987654">
    <posx>0</posx>
    <posy>0</posy>
    <width>1920</width>
    <height>1080</height>
    <aspectratio>stretch</aspectratio>
    <randomize>true</randomize>
    <timeperimage>5000</timeperimage>
    <fadetime>250</fadetime>
    <imagepath background="true">$INFO[ListItem.Path,,/extrafanart/]</imagepath>
</control>
<control type="image" id="999999">
    <visible>IsEmpty(Control.GetLabel(987654))</visible>
    <posx>500</posx>
    <posy>0</posy>
    <width>1920</width>
    <height>1080</height>
    <aspectratio>stretch</aspectratio>
    <fadetime>250</fadetime>
    <texture>$INFO[ListItem.Property(Fanart_Image)]</texture>
</control>

Example 3: Using the above code but change IsEmpty to !IsEmpty.
Now (999999) is never visible even if the extrafanart folder for (987654) has something in it.

Note: I'm not using this for the home page. Trying to get this working properly from the movie list view.
Reply

Logout Mark Read Team Forum Stats Members Help
multiimage question1