MusicPlayerDaemon / MPD

Music Player Daemon
https://www.musicpd.org/
GNU General Public License v2.0
2.16k stars 346 forks source link

MPD 0.22.4 breaks cue metadata support #1070

Closed imi415 closed 3 years ago

imi415 commented 3 years ago

Bug report

Describe the bug

Starting from v0.22.4, when playing tracks from cuesheet playlist, client has no metadata e.g. artist, track no., or title information.

Expected Behavior

Client show the correct metadata from cuesheet fields, e.g.

mpc -h ~/.mpd.socket current
Key Sounds Label - Lia / Saya's Song

Actual Behavior

mpc -h ~/.mpd.socket current
<cuesheet_path_and_name>.cue/track0014

Version

Music Player Daemon 0.22.4 (0.22.4)
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 udisks nfs curl

Neighbor plugins:
 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
 [sidplay] sid mus str prg P00
 [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 rtp:// rtsp:// rtsps://
 [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 io_uring archive alsa tidal qobuz curl ffmpeg nfs mms cdio_paranoia

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

Protocols:
 file:// alsa:// cdda:// ftp:// ftps:// gopher:// hls+http:// hls+https:// http:// https:// mms:// mmsh:// mmst:// mmsu:// nfs:// qobuz:// rtmp:// rtmpe:// rtmps:// rtmpt:// rtmpte:// rtmpts:// rtp:// rtsp:// rtsps:// scp:// sftp:// smb:// srtp:// tidal://

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

Log

client: [1] process command "playid "2""
playlist: play 0:"<cuesheet_path_and_name>.cue/track0014"
client: [1] command returned 0
client: [1] process command "idle"
client: [1] command returned 1
client: [1] process command "status"
client: [1] command returned 0
decoder_thread: probing plugin sndfile
client: [1] process command "plchanges "3""
client: [1] command returned 0
client: [1] process command "status"
client: [1] command returned 0
imi415 commented 3 years ago
Example cuesheet which could reproduce this issue

``` REM GENRE Soundtrack REM DATE 2008 REM DISCID B50CF20F REM COMMENT "ExactAudioCopy v1.0b3,Ripped by imi415@U2" PERFORMER "Key Sounds Label" TITLE "Little Busters! Ecstasy Tracks" FILE "Key Sounds Label - Little Busters! Ecstasy Tracks.wav" WAVE TRACK 01 AUDIO TITLE "Rita / Little Busters! -Ecstacy Short Ver.-" PERFORMER "Key Sounds Label" INDEX 01 00:00:00 TRACK 02 AUDIO TITLE "折戸伸治 / Will & Wish" PERFORMER "Key Sounds Label" INDEX 00 03:38:00 INDEX 01 03:39:00 TRACK 03 AUDIO TITLE "麻枝准 / 猫と硝子と円い月" PERFORMER "Key Sounds Label" INDEX 00 07:12:10 INDEX 01 07:13:10 TRACK 04 AUDIO TITLE "麻枝准 / 駆ける" PERFORMER "Key Sounds Label" INDEX 00 10:19:10 INDEX 01 10:20:10 TRACK 05 AUDIO TITLE "麻枝准 / glassware" PERFORMER "Key Sounds Label" INDEX 00 13:46:10 INDEX 01 13:47:10 TRACK 06 AUDIO TITLE "麻枝准 / Saya's Melody" PERFORMER "Key Sounds Label" INDEX 00 18:16:10 INDEX 01 18:17:10 TRACK 07 AUDIO TITLE "折戸伸治 / Labyrinth" PERFORMER "Key Sounds Label" INDEX 00 20:32:39 INDEX 01 20:33:39 TRACK 08 AUDIO TITLE "折戸伸治 / Shadow Buster" PERFORMER "Key Sounds Label" INDEX 00 26:12:39 INDEX 01 26:13:39 TRACK 09 AUDIO TITLE "Manack / Thinking Time" PERFORMER "Key Sounds Label" INDEX 00 29:58:39 INDEX 01 29:59:39 TRACK 10 AUDIO TITLE "霜月はるか / Sha La La Ecstasy" PERFORMER "Key Sounds Label" INDEX 00 32:45:02 INDEX 01 32:46:02 TRACK 11 AUDIO TITLE "Lia / Saya's Song - Short Ver. -" PERFORMER "Key Sounds Label" INDEX 00 35:17:02 INDEX 01 35:18:02 TRACK 12 AUDIO TITLE "麻枝准 / Song for friends - No Intro Ver. -" PERFORMER "Key Sounds Label" INDEX 00 38:58:02 INDEX 01 38:59:02 TRACK 13 AUDIO TITLE "Rita / Alicemagic - Rockstar Short Ver. -" PERFORMER "Key Sounds Label" INDEX 00 42:09:02 INDEX 01 42:10:02 TRACK 14 AUDIO TITLE "Lia / Saya's Song" PERFORMER "Key Sounds Label" INDEX 00 45:24:02 INDEX 01 45:25:02 TRACK 15 AUDIO TITLE "Rita / Little Busters! - Ecstacy Ver. -" PERFORMER "Key Sounds Label" INDEX 00 50:27:02 INDEX 01 50:28:02 ```

MaxKellermann commented 3 years ago

I cannot reproduce the problem:

$ mpc current
Key Sounds Label - 折戸伸治 / Will & Wish

But maybe this only happens with the WAV file you're using? You did not provide it, so I used some random WAV file from my hard disk.

imi415 commented 3 years ago

Thank you for your reply, I did a bisect from v0.22.3 to v0.22.4, and this is the first commit this issue appears: 1afa33c3c766af22c35b02ba58e84693243a4f3e

Also, this issue only affects clients which use addid command instead of add command. During my trials, mpc used add command so everything went well, however, ncmpcpp used addid command, which is affected by this issue.

Logs from ncmpcpp:

...
client: [0] process command "addid "[EAC]Key Sounds Label-リトルバスターズ!-Ecstasy Tracks/Key Sounds Label - Little Busters! Ecstasy Tracks.cue/track0008""
playlist: queue song 7:"[EAC]Key Sounds Label-リトルバスターズ!-Ecstasy Tracks/Key Sounds Label - Little Busters! Ecstasy Tracks.cue/track0008"
client: [0] command returned 0
client: [0] process command "playid "11""
playlist: play 7:"[EAC]Key Sounds Label-リトルバスターズ!-Ecstasy Tracks/Key Sounds Label - Little Busters! Ecstasy Tracks.cue/track0008"
decoder_thread: probing plugin sndfile
decoder: audio_format=44100:16:2, seekable=true
...

Logs from mpc:

...
state_file: Saving state file /home/imi415/mpd_tmp/config/state
client: [1] opened from [::1]:60668
client: [1] process command list
client: process command "add "[EAC]Key Sounds Label-リトルバスターズ!-Ecstasy Tracks/Key Sounds Label - Little Busters! Ecstasy Tracks.cue/track0003""
client: command returned 0
client: [1] process command list returned 0
client: [1] closed

...
imi415 commented 3 years ago

I'm not familiar with the code or C++, so I can't tell how this commit breaks, but I'm sure this issue is from mpd, since the correct metadata can be parsed by ncmpcpp if added by mpc using add command.

MaxKellermann commented 3 years ago

Also, this issue only affects clients which use addid command instead of add command.

This was an extremely important hint. Your bug report previously did not have any information on how to reproduce, which is bad.

imi415 commented 3 years ago

On MPD v0.22.6 this happens again. Request to reopen this issue.

MaxKellermann commented 3 years ago

Exactly the same problem with the same symptoms and the same log?

imi415 commented 3 years ago

Yes, the symptoms are identical, logs from ncmpcpp are attached anyway.

...
client: [1] process command "idle"
client: [1] command returned 1
client: [1] process command "addid "[EAC]Key Sounds Label-リトルバスターズ!-Ecstasy Tracks/Key Sounds Label - Little Busters! Ecstasy Tracks.cue/track0002""
client: [1] command returned 0
client: [1] process command "playid "3""
playlist: play 0:"[EAC]Key Sounds Label-リトルバスターズ!-Ecstasy Tracks/Key Sounds Label - Little Busters! Ecstasy Tracks.cue/track0002"
client: [1] command returned 0
client: [1] process command "idle"
client: [1] command returned 1
...