You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Metadata can be checked via dbusclient.py, e.g. python dbusclient.py get all
To implement this, the current_song_is_ad() method could look like this return self.dbus.get_song_title() and not self.dbus.get_song_artist() and the wmctrl resp. get_windows logic could be removed entirely.
The text was updated successfully, but these errors were encountered:
Just a quick remark. While working on updating our bash adblocker I've run into quite a few ads that weren't as straightforward to identify. For some reason DBus isn't updated with some ads, making ad detection solely based on the track metadata somewhat unreliable. Because of this I've opted to stay with the older window properties based detection method for now.
Blockify currently uses wmctrl to find the Spotify window and extract its title.
This isn't necessary as DBus provides enough metadata to detect if the current track is an ad:
a) Commercials have title information but blank artist info
b) Commercials have a different track url (https://open.spotify.com/ad/id instead of https://open.spotify.com/track/id)
Metadata can be checked via dbusclient.py, e.g.
python dbusclient.py get all
To implement this, the current_song_is_ad() method could look like this
return self.dbus.get_song_title() and not self.dbus.get_song_artist()
and the wmctrl resp. get_windows logic could be removed entirely.The text was updated successfully, but these errors were encountered: