2014-02-15, 02:01
I think I have found an issue with the python xbmc.Player(), if I start playing a file from a python addon and then use the xbmc.Player().stop() from a different thread (in this case a service thread) the stop() never returns and xbmc starts acting weird including not being able to exit cleanly.
I have tested this with clean installs of both Frodo 12.3 and a recent nightly build (10th Feb) of Gotham.
This test consists of two addons, a simple play the first thing you see in the local lib video addon and a simple service addon that listens for connections and then calls xbmc.Player().stop()
Just extract them into the addon dir. RESTART Xbmc
Open the addon in the video addon list and select the first menu item that appears. It will try to play the first item in your LOCAL video library so make sure your video library has a least one playable video in it.
When the video is playing open a browser and enter the following url on the same machine as xbmc
http://127.0.0.1:15002/?id=stop
This should use the service to stop the playback.
When I do this on my machine the xbmc.Plater().stop() function never returns and the video continues to play but in the background. This also causes Xbmc to not exit cleanly, xbmc needs to be killed with task manager before you can run it again.
Test Addon Files
https://skydrive.live.com/redir?resid=AE...ile%2c.zip
I have tested this with clean installs of both Frodo 12.3 and a recent nightly build (10th Feb) of Gotham.
This test consists of two addons, a simple play the first thing you see in the local lib video addon and a simple service addon that listens for connections and then calls xbmc.Player().stop()
Just extract them into the addon dir. RESTART Xbmc
Open the addon in the video addon list and select the first menu item that appears. It will try to play the first item in your LOCAL video library so make sure your video library has a least one playable video in it.
When the video is playing open a browser and enter the following url on the same machine as xbmc
http://127.0.0.1:15002/?id=stop
This should use the service to stop the playback.
When I do this on my machine the xbmc.Plater().stop() function never returns and the video continues to play but in the background. This also causes Xbmc to not exit cleanly, xbmc needs to be killed with task manager before you can run it again.
Test Addon Files
https://skydrive.live.com/redir?resid=AE...ile%2c.zip