Whitelist Case-sensitivity and Spotifyd
AndydeCleyre opened this issue · 5 comments
0.1.0.r12.5bd7919
I'm not sure what the correct fix for this is (might be a spotifyd
or playerctl
problem, really), but here's what I can see happening, using spotifyd 0.2.24
and playerctl 2.1.1
:
$ playerctl --list-all
spotifyd
With the following rescrobbled whitelist, spotifyd is not detected:
player-whitelist = ["spotify", "ncspot", "mopidy", "spotifyd"]
So I removed the whitelist and the rescrobbled log offered:
2020-04-05 13:15:22.923451435 Found active player Spotifyd
So I've made the whitelist:
player-whitelist = ["spotify", "ncspot", "mopidy", "Spotifyd"]
Which works fine. But I'd like whatever playerctl --list-all
reports to work as a whitelist entry. I don't know if that means using case-insensitive matching here, or if the case is inappropriately handled by either playerctl
or spotifyd
. If I specify Spotifyd
as the player to playerctl
, it does not find it.
Thanks again for this great tool!
Hi, thanks for reporting this. I think the issue lies in the way playerctl determines the player name. From what I can see, it extracts it from the player's bus name which is something like org.mpris.MediaPlayer2.spotifyd
. Rescrobbled on the other hand takes the player's Identity
property, which would be Spotifyd
in this case.
Question though: is spotify
in your whitelist the identity official Spotify client? Because on my end, the official client reports Spotify
as its identity, so whitelisting spotify
wouldn't work.
Anyway, it probably makes sense to be able to whitelist based on bus name, and I will look into adding that.
Thanks very much!
Yes, spotify
is for the official client, but either I hadn't tested with rescrobbled
or when I did I also had my account officially linked to last.fm
anyway and didn't notice; I just used the name as reported by playerctl
.
I've just implemented this in #25. Could you please check out if it works for you?
Thanks! That branch is working great.
Great to hear! I've merged it, thanks for the suggestion.