-
Notifications
You must be signed in to change notification settings - Fork 46
Handle xesam:albumArtist being a string and not an array #243
base: main
Are you sure you want to change the base?
Conversation
Make sure AlbumArtist strings work as well as arrays
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a deviation from https://www.freedesktop.org/wiki/Specifications/mpris-spec/metadata/#xesam:albumartist.
How common is this? I would like to avoid a workaround here, but if many players are not following the spec then I'd be more open to this change.
I wonder if maybe the better PR would be to just change https://github.com/Sinono3/souvlaki/blob/287797cd926fd7be802d5310fcc3836b0f5bc556/src/platform/linux/mod.rs#L303 😃 |
From my somewhat limited experience, most players are not quite adhering to the spec. But I agree that the proper way would be to change Souvlaki here. |
Okay, if its more than just this one, let's make the change. Can you also do the same for artist just to be consistent? Other than that this looks good to me. |
Got tripped up by this when using https://github.com/Sinono3/souvlaki through https://github.com/jpochyla/psst.
It uses
xesam:albumArtist
instead ofxesam:artist
and thexesam:albumArtist
is a String, not Array, so we should probably handle that, even if it's not convention.Added a basic test for string vs array. Probably not the best way of doing it, but it works.