altdesktop / playerctl

🎧 mpris media player command-line controller for vlc, mpv, RhythmBox, web browsers, cmus, mpd, spotify and others.
GNU Lesser General Public License v3.0
2.39k stars 80 forks source link

Metadata ignores all but last key #332

Open emperor06 opened 1 month ago

emperor06 commented 1 month ago

Player Lollypop on Arch Linux

The documentation suggests metadata can take multiple keys (metadata [KEY...]) but when passing multiple keys, only the last one is displayed.

Example: $ playerctl metadata artist MyBand

$ playerctl metadata title MySong

$ playerctl metadata artist title MySong

emperor06 commented 1 month ago

I think I've found where the problem is. I've made a naive attempt at fixing it that works for me, but I'm really not familiar with glib and low-level string memory things so it may very well segfault or memleak. Here's the attempt, just in case: https://github.com/emperor06/playerctl/commit/c3700b05f769f4150e19609a3e78e306accfebc0