Closed smithjd15 closed 4 years ago
Duplicate of https://github.com/MusicPlayerDaemon/MPD/issues/758 which was closed because you were using an outdated unsupported MPD version.
Your log is incomplete, maybe because it's not verbose (--verbose
).
The explanation of your setup is incomplete.
And you didn't post any data which would allow me to reproduce.
Steps to obtain a matching log snippet: 1)Try and play a playlist with relative paths in M.A.L.P. List is opened and first track attempted played, giving a Bad Song Index error
2)Then, attempt playback of a single song after opening the playlist in M.A.L.P. List is read when the playlist is opened in M.A.L.P. The track is attempted played when opened from the now-listed playlist in M.A.L.P, and 'No Such Directory' or 'Bad URI' is given depending on whether the music_directory is local or over the network.
xxx xx xx:xx : client: [1] process command "lsinfo "playlists"" xxx xx xx:xx : client: [1] command returned 0 xxx xx xx:xx : client: [1] process command "idle" xxx xx xx:xx : client: [1] command returned 1 xxx xx xx:xx : client: [1] process command "status" xxx xx xx:xx : client: [1] command returned 0 xxx xx xx:xx : client: [1] process command "idle" xxx xx xx:xx : client: [1] command returned 1 xxx xx xx:xx : client: [1] process command "clear" xxx xx xx:xx : client: [1] command returned 0 xxx xx xx:xx : client: [1] process command "load "playlists/xxxx.xspf"" xxx xx xx:xx : client: [1] command returned 0 xxx xx xx:xx : client: [1] process command "play 0" xxx xx xx:xx : exception: Bad song index xxx xx xx:xx : client: [1] command returned 2 xxx xx xx:xx : client: [1] process command "idle" xxx xx xx:xx : client: [1] command returned 1 xxx xx xx:xx : client: [1] process command "status" xxx xx xx:xx : client: [1] command returned 0 xxx xx xx:xx : client: [1] process command "currentsong" xxx xx xx:xx : client: [1] command returned 0 xxx xx xx:xx : client: [1] process command "idle" xxx xx xx:xx : client: [1] command returned 1 xxx xx xx:xx : state_file: Saving state file /var/lib/mpd/state xxx xx xx:xx : client: [1] process command "listplaylistinfo "playlists/xxxx.xspf"" xxx xx xx:xx : client: [1] command returned 0 xxx xx xx:xx : client: [1] process command "idle" xxx xx xx:xx : client: [1] command returned 1 xxx xx xx:xx : client: [1] process command "playlistfind file "playlists/../xxx/xxx/xxxx.mp3"" xxx xx xx:xx : client: [1] command returned 0 xxx xx xx:xx : client: [1] process command "add "playlists/../xxx/xxx/xxxx.mp3"" xxx xx xx:xx : exception: No such directory xxx xx xx:xx : client: [1] command returned 2 xxx xx xx:xx : client: [1] process command "idle" xxx xx xx:xx : client: [1] command returned 1
xxx xx xx:xx : client: [1] process command "lsinfo "playlists"" xxx xx xx:xx : client: [1] command returned 0 xxx xx xx:xx : client: [1] process command "idle" xxx xx xx:xx : client: [1] command returned 1 xxx xx xx:xx : client: [1] process command "clear" xxx xx xx:xx : client: [1] command returned 0 xxx xx xx:xx : client: [1] process command "load "playlists/xxxx.xspf"" mkdir failed on directory /var/cache/samba: Permission denied mkdir failed on directory /var/cache/samba: Permission denied mkdir failed on directory /var/cache/samba: Permission denied xxx xx xx:xx : client: [1] command returned 0 xxx xx xx:xx : client: [1] process command "play 0" xxx xx xx:xx : exception: Bad song index xxx xx xx:xx : client: [1] command returned 2 xxx xx xx:xx : client: [1] process command "idle" xxx xx xx:xx : client: [1] command returned 1 xxx xx xx:xx : client: [1] process command "status" xxx xx xx:xx : client: [1] command returned 0 xxx xx xx:xx : client: [1] process command "currentsong" xxx xx xx:xx : client: [1] command returned 0 xxx xx xx:xx : client: [1] process command "idle" xxx xx xx:xx : client: [1] command returned 1 xxx xx xx:xx : state_file: Saving state file /var/lib/mpd/state xxx xx xx:xx : client: [1] process command "listplaylistinfo "playlists/xxxx.xspf"" xxx xx xx:xx : client: [1] command returned 0 xxx xx xx:xx : client: [1] process command "idle" xxx xx xx:xx : client: [1] command returned 1 xxx xx xx:xx : client: [1] process command "playlistfind file "playlists/../xxx/xxx/xxxx.mp3"" xxx xx xx:xx : client: [1] command returned 0 xxx xx xx:xx : client: [1] process command "add "playlists/../xxx/xxx/xxxx.mp3"" xxx xx xx:xx : exception: Bad URI xxx xx xx:xx : client: [1] command returned 2 xxx xx xx:xx : client: [1] process command "idle" xxx xx xx:xx : client: [1] command returned 1
The music_directory folder looks like: dir/ dir2/ dir3/ playlists/
Each xspf in playlists contains tracks that start with ../, i.e. relative urls that point back to tracks in dir/, dir2/, dir3/, etc.
What it looks like is that the path is not resolving the (../) part of the url to a path relative to the music dir as the root. The url looks resolvable otherwise, it's simply not resolving into a valid path. Since it's not allowed to add tracks outside of the music_directory folder, the playlists/../xxx/xxx/xxxx.mp3 urls could probably fundamentally come to look like /xxx/xxx/xxxx.mp3 to mpd without breaking something.
What further information would be helpful?
This seems to be the same issue as report here: https://github.com/MusicPlayerDaemon/MPD/issues/200
Describe the bug
Playlists opened from files with relative paths to the playlist tracks don't work.
Expected Behavior
MPD should resolve these playlists relative to the path the playlists are in, and playback without error.
Actual Behavior
I have a daemon acting as a master for a remote daemon with smb and the proxy db. The error for trying to play back a track from a playlist loaded from a file in M.A.L.P. for both differ. mpc won't load any tracks into the playlist (via mpc load playlists/xxxx.xspf) on either daemon. Further, I get a "Bad song index" error when trying to play back the entire xspf playlist file from M.A.L.P.. This error occurs on both daemons.
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 [sidplay] sid mus str prg P00 [wildmidi] mid [fluidsynth] mid [adplug] amd d00 hsc laa rad raw sa2 [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 sndio pipe alsa ao oss openal pulse jack httpd recorder
Encoder plugins: null vorbis opus lame 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
Log
The log for local playback with M.A.L.P.:
xxx xx xx:xx : client: [15] opened from xxxx.xxx.x.xx:xxxxx xxx xx xx:xx : exception: Bad song index xxx xx xx:xx : exception: No such directory xxx xx xx:xx : exception: No such directory xxx xx xx:xx : exception: No such directory xxx xx xx:xx : exception: No such directory xxx xx xx:xx : client: [15] closed
The log for remote playback with M.A.L.P.:
xxx xx xx:xx : client: [11] opened from xxxx.xxx.x.xx:xxxxx xxx xx xx:xx : exception: Bad song index xxx xx xx:xx : exception: Bad URI xxx xx xx:xx : exception: Bad URI xxx xx xx:xx : exception: Bad URI xxx xx xx:xx : client: [11] closed
The log for both with mpc:
xxx xx xx:xx : client: [63] opened from local xxx xx xx:xx : client: [63] closed