Closed ntninja closed 9 years ago
Other observations:
GLib.Error: None: None (0)
to be thrown (which isn't what you'd would expect)playerctl.Player()
instance a crash occurs with pygi: http://pastebin.com/GhKYMN8Jplayerctl.Player().play()
still has the power to end it at any point (full stack trace: http://pastebin.com/pmEmdPJ8 )I can confirm this.
Error handling needs some improvements.
I made some changes that should fix all these issues. Test it out and let me know if there are any more problems.
I want to make some changes to how the library handles a player that cannot connect when no bus name is given. Right now, the object is useless when it can't connect.
I think it should try to reconnect to the first player it can find whenever it can't find a player and use that player for the life of the object.
Another way to go would be to call the method on every player it can find, but that might cause problems, and won't work at all for retrieving metadata.
What do you think it should do?
As you can see from the log calling
playerctl.Player().stop()
produces the expected result (an exception), butplayerctl.Player().play()
causes a segmentation fault.