Bug with xbmc.Plater().stop()
#1
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
Reply
#2
I have also been looking into this issue.

It seems like the bug has something to do with XBMC losing track of what directory it is in when said directory is an AddOn.

This seems to work around the issue:
Code:
xbmc.executebuiltin('xbmc.activatewindow(10000)')
            xbmc.Player().stop()

Would definitely like to identify the root cause though.

xnappo
Reply
#3
Hello null_pointer,

Can you rehost or post the Test Addon Files?

I'm trying to figure out how to pause a playing video from a service.
Reply
#4
(2014-02-15, 03:00)xnappo Wrote: I have also been looking into this issue.

It seems like the bug has something to do with XBMC losing track of what directory it is in when said directory is an AddOn.

This seems to work around the issue:
Code:
xbmc.executebuiltin('xbmc.activatewindow(10000)')
xbmc.Player().stop()

Would definitely like to identify the root cause though.

xnappo 
Can You believe this bug still exists in Kodi 18 and this just fixed it for me, thank you Smile
Reply

Logout Mark Read Team Forum Stats Members Help
Bug with xbmc.Plater().stop()0