Kodi Community Forum

Full Version: a little assist
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i have am using a script i modified to do the ever-popular "run a playlist at startup" thing.
i would like to add a bit so that on execution, the script will pause for x seconds before doing the rest. this would allow the startup sound to complete properly. at present, my script cuts off my startup sound and the results sound pretty stupid Wink

i know that in python indentation is everything, so i posted the script i am using on a webserver.

anyone wanna help me out, it's over here:
http://www.skinjob.net/tsp/autoexec.py
line 43 , add this, juste before xbmc.player().play(plist) :

Quote:import time
time.sleep(2)#wait 2 seconds before going on

or better (maybe but you'll have to test it)
Quote:xbmc.sleep(2)
the first bunch worked. the second bunch did not. thanks a lot Smile
the xbmc.sleep() is in milliseconds so xbmc.sleep(2000).

but you'll need a recent build for that to work. after the update some documentation was done.