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.43k stars 79 forks source link

incorrect metadata when multiple players are running #256

Open jmcantrell opened 2 years ago

jmcantrell commented 2 years ago

When more than one player is running (not necessarily playing anything), if a piece of metadata is missing from one player, it will return the data from the other player.

For example, here's the scenario where I can see this problem:

  1. start ncspot, play something, then pause it
  2. start mpv, play something without an artist metadata field, then pause it
  3. get the artist metadata with playerctl metadata artist
  4. see that the returned artist is for the track playing on ncspot
  5. get the title metadata with playerctl metadata title
  6. see that the returned title is for the file playing on mpv

playerctl version: 2.4.1

acrisci commented 2 years ago

This is by design. In general, if an operation is not supported, playerctl will move to the next player. You can probably get what you want with the formatter with playerctl metadata --format "{{title}}".