Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-value MusicBrainz ID tags in MP3 files are not handled correctly #687

Open
elomatreb opened this issue Dec 2, 2019 · 2 comments

Comments

@elomatreb
Copy link

@elomatreb elomatreb commented Dec 2, 2019

Bug report

Describe the bug

The MusicBrainz tags containing artist IDs (MBIDs), both for the album and for individual tracks, can contain multiple values. In MP3 files, these are treated incorrectly.

Expected Behavior

In a FLAC file, the tag returns multiple values correctly (partial output of currentsong):

[...]
MUSICBRAINZ_ALBUMARTISTID: 1f9df192-a621-4f54-8850-2c5373b7eac9
MUSICBRAINZ_ALBUMARTISTID: dea28aa9-1086-4ffa-8739-0ccc759de1ce
MUSICBRAINZ_ALBUMARTISTID: d2ced2f1-6b58-47cf-ae87-5943e2ab6d99
[...]

Actual Behavior

In an MP3 file tagged with ID3v2.3, the values are joined with / and treated as one long value:

[...]
MUSICBRAINZ_ALBUMARTISTID: 1f9df192-a621-4f54-8850-2c5373b7eac9/dea28aa9-1086-4ffa-8739-0ccc759de1ce/d2ced2f1-6b58-47cf-ae87-5943e2ab6d99
[...]

In an MP3 file tagged with ID3v2.4, the values are separated with null-bytes, and the tag value is truncated before the first terminator:

[...]
MUSICBRAINZ_ALBUMARTISTID: 1f9df192-a621-4f54-8850-2c5373b7eac9
[...]

This last behavior makes this behavior especially frustrating, because at least the long /-separated value can be parsed on the client side.

Version

Music Player Daemon 0.21.16 (0.21.16)
Copyright 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright 2008-2018 Max Kellermann <max.kellermann@gmail.com>
This is free software; see the source for copying conditions.  There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Database plugins:
 simple proxy upnp

Storage plugins:
 local smbclient udisks nfs curl

Neighbor plugins:
 smbclient upnp udisks

Decoders plugins:
 [mad] mp3 mp2
 [mpg123] mp3
 [vorbis] ogg oga
 [oggflac] ogg oga
 [flac] flac
 [opus] opus ogg oga
 [sndfile] wav aiff aif au snd paf iff svx sf voc w64 pvf xi htk caf sd2
 [audiofile] wav au aiff aif
 [dsdiff] dff
 [dsf] dsf
 [hybrid_dsd] m4a
 [faad] aac
 [mpcdec] mpc
 [wavpack] wv
 [modplug] 669 amf ams dbm dfm dsm far it med mdl mod mtm mt2 okt s3m stm ult umx xm
 [mikmod] amf dsm far gdm imf it med mod mtm s3m stm stx ult uni xm
 [wildmidi] mid
 [fluidsynth] mid
 [ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 adx afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg opus psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tak tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav webm wma wmv wsaud wsvga wv wve
 [gme] ay gbs gym hes kss nsf nsfe sap spc vgm vgz
 [pcm]

Filters:
 libsamplerate soxr

Tag plugins:
 id3tag

Output plugins:
 shout null fifo pipe alsa ao oss openal solaris pulse jack httpd recorder

Encoder plugins:
 null vorbis opus lame twolame wave flac

Archive plugins:
 [bz2] bz2
 [zzip] zip
 [iso] iso

Input plugins:
 file archive alsa tidal qobuz curl ffmpeg smbclient nfs mms cdio_paranoia

Playlist plugins:
 extm3u m3u pls xspf asx rss soundcloud flac cue embcue

Protocols:
 file:// alsa:// tidal:// qobuz:// http:// https:// gopher:// rtp:// rtsp:// rtmp:// rtmpt:// rtmps:// smb:// nfs:// mms:// mmsh:// mmst:// mmsu:// cdda://

Other features:
 avahi dbus udisks epoll icu inotify ipv6 systemd tcp un

I can provide the sample files I used to generate the above results if necessary, but since they are actual recordings I wanted to avoid uploading them for now.

@MaxKellermann

This comment has been minimized.

Copy link
Member

@MaxKellermann MaxKellermann commented Dec 2, 2019

A sample file is necessary. Maybe you can copy the ID3 tag to another (empty?) mp3 file - I don't need your music payload, just an arbitrary file with the tag that reproduces the problem.

@elomatreb

This comment has been minimized.

Copy link
Author

@elomatreb elomatreb commented Dec 3, 2019

GitHub refuses to let me upload audio files for some reason, so I uploaded to them to my server for now: https://ole.bertr.am/files/demos.tar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.