2008-02-28, 02:56
I'm trying to put together a script, that will load and play a video playlist. I'm using Thor918's MyPlayer class to overlay xbmc.Player so I can hook into the Stop/Start/Ended events.
My problem is, how to keep my script from exiting...
My first attempt was to put a while loop in once everything was setup, with a sleep in the while loop. This appears to work when testing on the PC using XBMC_PC, but on the actual xbox, it doesn't work as well.
I end up not getting my function calls from the player events. I'm assuming, this is because I'm in a sleep state when they're triggered.
My next attempt was to use a blank window, so I could use a doModal() call to keep my script running. That seems to leave me with a rapidly flashing video where my blank window keeps swapping focus with the playing video. It also crashes XBMC_PC
I feel like I'm overlooking a rather simple and obvious method of doing this, I just can't come up with it, and I've been searching around, but haven't found an example.
My problem is, how to keep my script from exiting...
My first attempt was to put a while loop in once everything was setup, with a sleep in the while loop. This appears to work when testing on the PC using XBMC_PC, but on the actual xbox, it doesn't work as well.
I end up not getting my function calls from the player events. I'm assuming, this is because I'm in a sleep state when they're triggered.
My next attempt was to use a blank window, so I could use a doModal() call to keep my script running. That seems to leave me with a rapidly flashing video where my blank window keeps swapping focus with the playing video. It also crashes XBMC_PC
I feel like I'm overlooking a rather simple and obvious method of doing this, I just can't come up with it, and I've been searching around, but haven't found an example.