Kodi Community Forum
a little assist - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+--- Thread: a little assist (/showthread.php?tid=20663)



- SleepyP - 2006-06-24

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


- solexalex - 2006-06-24

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)



- SleepyP - 2006-06-24

the first bunch worked. the second bunch did not. thanks a lot Smile


- Nuka1195 - 2006-06-25

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.