Is there an easy way to refresh an multiimage control without doing a skin reload or re-open the window where it's used?
The problem is that I've added a script for downloading extrafanart. So when no images are available it just stay blank. I run the script so there will be images added to that folder but after that it stays blank. The only thing that works is close that percticular window and open it again or a skin reload.
multiimage control will get refreshed when path to images will change - so You make trick - to change path to point to empty directory for 1 frame and then change it back to dir with Your images (a little hacky but it works)
Is it possible you give me some pointer for how-to code? That would be great
Here's the part of the code:
Code:
<control type="multiimage">
<posx>715</posx>
<posy>404</posy>
<width>360</width>
<height>202</height>
<fadetime>1500</fadetime>
<timeperimage>4000</timeperimage>
<randomize>true</randomize>
<aspectratio align="center">scale</aspectratio>
<imagepath background="true">$INFO[ListItem.Path,,extrafanart]</imagepath>
<visible>Container(5000).HasFocus(8)</visible>
</control>
Code:
<item id="8">
<description>Get Extrafanart</description>
<label>$LOCALIZE[31316]</label>
<onclick condition="Container.Content(tvshows)">XBMC.RunScript(script.extrafanartdownloader, mediatype=tvshow, medianame=$INFO[ListItem.TVShowTitle])</onclick>
<onclick condition="Container.Content(movies)">XBMC.RunScript(script.extrafanartdownloader, mediatype=movie, medianame=$INFO[ListItem.Title])</onclick>
<visible>[Container.Content(tvshows)|Container.Content(movies)]+system.hasaddon(script.extrafanartdownloader)</visible>
</item>
pieh Wrote:multiimage control will get refreshed when path to images will change - so You make trick - to change path to point to empty directory for 1 frame and then change it back to dir with Your images (a little hacky but it works)
@
pieh (or someone else)
I know your very busy with the xbmc code (and real life ) but can't get it to work. Not yet that experienced with the GUI code.
Tried some things but no luck.
Do this:
Code:
<variable name="ExtraFanart">
<value condition="!IsEmpty(Window(Home).Property(ExtraFanart.Update))">$INFO[ListItem.Path,,empty]</value>
<value>$INFO[ListItem.Path,,extrafanart]</value>
</variable>
Add this variable as imagepath to your multiimage control. Then set the window property in the extrafanartdownloader script to 1 while it's downloading images and clear it if it's finished.