random photos sets on startup
#1
I want to be able to have a set of photos appear when selecting the photos window from the home screen. I've been able to do this with an addition to the home screen:

<control type="group" id="444">
<visible>Container(9000).HasFocus(4)</visible>
<control type="image">
<posx>640</posx>
<posy>0</posy>
<width>720</width>
<height>720</height>
<align>center</align>
<texture>photos.png</texture>
</control>
</control>
there are more things in the group but for simplicity, I'm just addressing the 'photos.png' which is a collage.
What I want to do is have several collages and on start-up one of them be shown from a random selection of say, five collages, ie. :
photos1, photos2, ....etc; so that every time XBMC starts up there will be a random choice made for the collage.

I'm pretty sure that I have created a python script that generates random numbers and have it execute on start-up:

#execute targeted script at startup.
import random
def token(values=6):
return random.randint(1, values)

where 'token' returns as a value from 1 to 5 integers only

This goes in the startup.xml:

<onload>XBMC.RunScript(C:\Users\pan2\AppData\Roaming\XBMC\userdata\random.py)</onload>

What I'm not sure of is the change to the <textures>photosHuh?.png</texture> to make it work, or in fact whether it will work at all
Reply

Logout Mark Read Team Forum Stats Members Help
random photos sets on startup0