2011-11-30, 14:56
I have a script which generates a playlist and then plays it. This is all done through JSON-RPC.
I need to then resume the script once the playlist has stopped (either because it reaches the end or the user has pressed stop).
If I open a telnet session on port 9090 I can see the JSON-RPC notification "onStop" is triggered. Is there any way to capture this from within a python script?
If that's not possible, is there another appropriate way to do this? I could probably do something like check for active players on a loop, but this would seem to require a large number of repeated JSON requests.
I'm running nightly version from 26/11/11.
EDIT:
It also looks like the OnStop notification is triggered between playlist items - so this may not be the best way.
Any tips greatly appreciated.
el_P
I need to then resume the script once the playlist has stopped (either because it reaches the end or the user has pressed stop).
If I open a telnet session on port 9090 I can see the JSON-RPC notification "onStop" is triggered. Is there any way to capture this from within a python script?
If that's not possible, is there another appropriate way to do this? I could probably do something like check for active players on a loop, but this would seem to require a large number of repeated JSON requests.
I'm running nightly version from 26/11/11.
EDIT:
It also looks like the OnStop notification is triggered between playlist items - so this may not be the best way.
Any tips greatly appreciated.
el_P