The MPRIS specification defines the xesam:artist property as being a String Array, not a string, see https://www.freedesktop.org/wiki/Specifications/mpris-spec/metadata/#index6h4. However, the mediacontroller only shows the artist field when it is a plain string, which results in this error in the console when launching plasmawindowed org.kde.plasma.mediacontroller while a specification-conform MediaPlayer runs: file:///usr/share/plasma/plasmoids/org.kde.plasma.mediacontroller/contents/ui/main.qml:52:5: Unable to assign QStringList to QString And does not show any artist.
Moved this to the right component (I hope). Can confirm it's still an issue on plasma-workspace 5.17.0.
What player are you using? VLC gives me a string. I can fix that but I'd like to test with an actual player that does it, as to not break those that don't
I've got a custom script that pulls data from a web page and feeds it into MRPIS, and I have it follow the FDO spec. Clementine seems to use a list too: https://github.com/clementine-player/Clementine/blob/17d95b7833fd0f8b7547d70a6dbf3367be31b85e/src/core/song.cpp#L1176 (despite only ever having a single artist per track). So does Rhythmbox: https://github.com/GNOME/rhythmbox/blob/4abbd528da0a32d0c343a22d5dfb2c5e98c489f5/plugins/mpris/rb-mpris-plugin.c#L557 (but, again, only with a single track - note the last argument to add_string_property_2, which is "gboolean as_list"). VLC seems to also use a single item list? https://github.com/videolan/vlc/blob/f83434ac6488e5cee32e191f9a89859254156b0e/modules/control/dbus/dbus.c#L1305 It seems like there's some sort of auto-cast involved - doing `console.log(currentMetadata["xesam:artist"])` gives me `[Artist Name]`, but the applet still processes it correctly. Adding more than one artist breaks things though.
A friend submitted a draft patch that seems to fix this: https://phabricator.kde.org/D24740 However, I can't actually find a single player that _does_ report xesam:artist as a single string, so it's possible that a correct patch could be a lot simpler.
Git commit 1be4bb880fdeea93381eb45846a7d487e58beb93 by Kai Uwe Broulik, on behalf of Denis Sheremet. Committed on 18/10/2019 at 07:02. Pushed by broulik into branch 'Plasma/5.17'. [Media Controller] Multiple artists support According to the spec, xesam:artist should be a string array, but majority of players uses string instead. This patch adds support for both string array and string options to allow new software development according to the spec but also maintain compatibility with existing solutions. FIXED-IN: 5.17.1 Differential Revision: https://phabricator.kde.org/D24740 M +15 -1 applets/mediacontroller/contents/ui/main.qml https://commits.kde.org/plasma-workspace/1be4bb880fdeea93381eb45846a7d487e58beb93