Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider using DBus signaling capabilties #100

Open
Sekuraz opened this issue Apr 28, 2016 · 2 comments
Open

Consider using DBus signaling capabilties #100

Sekuraz opened this issue Apr 28, 2016 · 2 comments

Comments

@Sekuraz
Copy link

Sekuraz commented Apr 28, 2016

Polling the dbus status of spotify does not work for me so I built this little script working with dbus signaling and based on a very minimal subset of your code.

You should also consider making python-docopt a hard dependency.
(blockify-minmal.txt)

@gmdfalk
Copy link
Owner

gmdfalk commented May 5, 2016

Thanks for the suggestion!
You are the first person to report that the Spotify dbus session isn't working. Do have any idea why?
I am asking because if this problem is likely to occur for a wide range of systems I'd look at implementing this. Otherwise I'm putting it in my backlog for this project.

@Sekuraz
Copy link
Author

Sekuraz commented May 5, 2016

It works in the gui session but not in the terminal one (I think, according to the ini sample, that polling is done every 200 seconds or so).
When I was debugging this problem I read a little into dbus and one of the first things i saw was the event driven stuff. So I implemented it straight away simplifying and reducing the stuff you did. It completely avoids polling so it seems to be a good solution for all polling related issues (cpu load, unknown timeouts of dbus (10 - 30 seconds! on a method call) and so on).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants