SecUpwN / Spotify-AdKiller

Your Party with Spotify - without ads!
https://github.com/SecUpwN/Spotify-AdKiller
GNU General Public License v3.0
836 stars 83 forks source link

1.0.14 compatibility #33

Closed ysangkok closed 8 years ago

ysangkok commented 8 years ago

An easier way to detect ads would be to just grep for "spotify:ad" in the metadata, that can now be retrieved using dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata' but this is probably not possible with old versions. I did it this way cause it was the minimal amount of change needed to get it working with new versions. We also need to check if Spotify is paused, and I did not find any way of doing this over DBUS. One way would be to check for corking, this would allow removing the xprop code, in theory. This is a larger change though.

OlegSmelov commented 8 years ago

Hello, @ysangkok!

Thanks for the pull request! I don't have a Linux computer near me at the moment, but I'll review the code later today.

I don't like the python dependency, however, that can probably be done without python.

ysangkok commented 8 years ago

How would you do it without Python? I didn't find the right dbus-send call yet. If the call could be made, it would require parsing the custom dict format of dbus-send. This has gotten harder now, since the author list has to be manually constructed.