blockify icon indicating copy to clipboard operation
blockify copied to clipboard

Consider using DBus signaling capabilties

Open Sekuraz opened this issue 8 years ago • 2 comments

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)

Sekuraz avatar Apr 28 '16 11:04 Sekuraz

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.

gmdfalk avatar May 05 '16 08:05 gmdfalk

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).

Sekuraz avatar May 05 '16 14:05 Sekuraz