MusicPlayerDaemon / MPD

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

Support relative paths in playlists #1271

Closed xeruf closed 3 years ago

xeruf commented 3 years ago

Bug report

Describe the bug

See #200 #758 #760 #772 - but now with a proper reproducible script!

#!/bin/sh -e
mv -v $XDG_CONFIG_HOME/mpd/mpd.conf $XDG_CONFIG_HOME/mpd/mpd.conf.bak$(date +%s)
echo 'music_directory "/tmp/music"
playlist_plugin {
  name "m3u"
  enabled "true"
}' | tee $XDG_CONFIG_HOME/mpd/mpd.conf
mkdir -vp /tmp/music/playlists
curl -L https://archive.org/download/testmp3testfile/mpthreetest.mp3 -o /tmp/music/test.mp3
echo "../test.mp3" | tee /tmp/music/playlists/test.m3u
mpd --stderr --verbose
mpc load playlists/test.m3u

Expected Behavior

test.mp3 plays

Actual Behavior

nothing plays

Version

❯ mpd --version
Music Player Daemon 0.22.11 (0.22.11)
Copyright 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright 2008-2021 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 rsn 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 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://

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

Log

❯ mpd --stderr --verbose --no-daemon
config_file: loading file /home/janek/.config/mpd/mpd.conf
exception: Default TCP listener setup failed, but this is okay because we have a $XDG_RUNTIME_DIR listener: Failed to bind to '[::]:6600'; Failed to bind socket: Address already in use
libsamplerate: libsamplerate converter 'Fastest Sinc Interpolator'
vorbis: Xiph.Org libVorbis 1.3.7
opus: libopus 1.3.1
sndfile: libsndfile-1.0.31
hybrid_dsd: The Hybrid DSD decoder is disabled because it was not explicitly enabled
simple_db: reading DB
output: No 'audio_output' defined in config file
output: Attempt to detect audio output device
output: Attempting to detect a alsa audio device
output: Successfully detected a alsa audio device
exception: Input plugin 'qobuz' is not configured: No Qobuz app_id configured
curl: version 7.79.1
curl: with OpenSSL/1.1.1l
avahi: Initializing interface
exception: RTIOThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permitted
avahi: Client changed to state 101
avahi: Client is CONNECTING
client: [1] opened from [::1]:45072
client: [1] process command list
client: process command "load "playlists/test.m3u""
client: command returned 0
client: [1] process command list returned 0
client: [1] closed
❯ mpc load playlists/test.m3u
loading: playlists/test.m3u
MaxKellermann commented 3 years ago

acc1bd6297ed4550f2e567aa2d2d27ffc6784629