Possible? playlist followed by slideshow?
#1
is there a way to wait for the first command below to finish before the executebuiltin command runs?

Quote:xbmc.player().play(plist)
xbmc.executebuiltin('xbmc.recursiveslideshow(' + picture_dir + ')')

currently the playlist gets ignored and only the slideshow is shown.
Reply
#2
perhaps you could add some delay?
either the xbmc sleep(ms) or python sleep(sec).

(acording to nuka's findings, xbmc sleep dosent seem to work, so better stick to pythons sleep)
xbmc-sleep:
http://home.no.net/thor918/xbmc/xbmc.html#-sleep

or

python sleep:
import time

xbmc.player().play(plist)
time.sleep(1)
xbmc.executebuiltin('xbmc.recursiveslideshow(' + picture_dir + ')')

Quote:time.sleep(secs) # go to sleep for awhile
seems the python sleep can be under 1 sec. just give it a comma value.
time.sleep(0.01)
Reply
#3
thanks. the time.sleep(sec) got them both working in sequence for now.

however ... this method assumes i know approximately how long the playlist needs to run. is there any method to check for a completed process? or perhaps a method to pre-scan a playlist playing time duration and load it as the time.sleep parameter?
Reply
#4
check the link in thor's signature to xbmc. look for the onplayback* methods.

thor, if you use anything other than an integer in xbmc.sleep(), it just returns without doing anything. if you use an integer except zero, it enters an endless loop. i'll bump the question to a developer to make sure the changes i think will work.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#5
onplayback.py 

nuka, i really don't see the need for xbmc sleep, if we can do the same thing in clean python code. do xmbcsleep have any advantages if it had worked as it was suppose to ?

by the way i seem to have used a xbmc sleep in the onplayback example, where i'm using it in a loop so that the code dosent end.



Reply
#6
and it never will Smile
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#7
hehe :lol: :p



Reply

Logout Mark Read Team Forum Stats Members Help
Possible? playlist followed by slideshow?0