KivalM / spotblock-rs

A spotify advertisment muter for Pipewire
GNU General Public License v3.0
14 stars 3 forks source link

starts_with("spotify:ad:") causes an ad not to be detected #6

Closed albarozzz closed 2 years ago

albarozzz commented 2 years ago

playerctl --player=spotify metadata --format '{{mpris:trackid}}' reports: a string starting with '/com/spotify/ad/' which makes the condition false because that is not 'spotify:ad:'

KivalM commented 2 years ago

Hey, thanks for pointing this out.

I did a bit of testing, the latest Spotify update changed the 'trackid' format. Your PR seems to fix the problem, but only for users on the latest version of the Spotify client.

Some adjustments need to be made before I can merge it...

Thank you