"exception: Bad song index" when opening valid m3u playlist?

Need help with MPD?
Post Reply
guixxx
Posts: 4
Joined: July 11th, 2018, 9:18 pm

"exception: Bad song index" when opening valid m3u playlist?

Post by guixxx » July 11th, 2018, 9:21 pm

I have a .m3u playlist of the album Nevermind, from Nirvana. Here's the content of it:

Code: Select all

../Artists/Nirvana/Nevermind (Remastered) (Album)/01 Smells Like Teen Spirit.flac
../Artists/Nirvana/Nevermind (Remastered) (Album)/02 In Bloom (Nevermind Version).flac
../Artists/Nirvana/Nevermind (Remastered) (Album)/03 Come As You Are.flac
../Artists/Nirvana/Nevermind (Remastered) (Album)/04 Breed.flac
../Artists/Nirvana/Nevermind (Remastered) (Album)/05 Lithium.flac
../Artists/Nirvana/Nevermind (Remastered) (Album)/06 Polly.flac
../Artists/Nirvana/Nevermind (Remastered) (Album)/07 Territorial Pissings.flac
../Artists/Nirvana/Nevermind (Remastered) (Album)/08 Drain You.flac
../Artists/Nirvana/Nevermind (Remastered) (Album)/09 Lounge Act.flac
../Artists/Nirvana/Nevermind (Remastered) (Album)/10 Stay Away.flac
../Artists/Nirvana/Nevermind (Remastered) (Album)/11 On A Plain.flac
../Artists/Nirvana/Nevermind (Remastered) (Album)/12 Something In The Way.flac
../Artists/Nirvana/Nevermind (Remastered) (Album)/13 Endless Nameless.flac
I can open this playlist with any player, e.g. VLC or mpv. But for some reason I am not aware, MPD can't open it (I'm using ncmpcpp and I've also tried with an Android app called M.A.L.P, but that didn't work too).
The log file only shows me the following message when I try to load that playlist:

Code: Select all

exception: Bad song index
And here is my ~/.config/mpd/mpd.conf:

Code: Select all

bind_to_address "127.0.0.1"
bind_to_address "192.168.1.2"

db_file            "~/.config/mpd/database"
log_file           "~/.config/mpd/log"

# Optional
music_directory    "/run/media/gui/SEAGATE/Multimedia/Music"
playlist_directory  "/run/media/gui/SEAGATE/Multimedia/Music/Playlists"
pid_file           "~/.config/mpd/pid"
state_file         "~/.config/mpd/state"
sticker_file       "~/.config/mpd/sticker.sql"

audio_output {
    type "pulse"
    name "MPD PulseAudio Stream"
}
Here's the folder structure of my music_directory:

Code: Select all

$ tree -v /run/media/gui/SEAGATE/Multimedia/Music
/run/media/gui/SEAGATE/Multimedia/Music
├── Artists
│   └── Nirvana
│       └── Nevermind (Remastered) (Album)
│           ├── 01 Smells Like Teen Spirit.flac
│           ├── 02 In Bloom (Nevermind Version).flac
│           ├── 03 Come As You Are.flac
│           ├── 04 Breed.flac
│           ├── 05 Lithium.flac
│           ├── 06 Polly.flac
│           ├── 07 Territorial Pissings.flac
│           ├── 08 Drain You.flac
│           ├── 09 Lounge Act.flac
│           ├── 10 Stay Away.flac
│           ├── 11 On A Plain.flac
│           ├── 12 Something In The Way.flac
│           └── 13 Endless Nameless.flac
└── Playlists
    └── Nirvana - [2011] Nevermind (Remastered).m3u

4 directories, 14 files
Any help is appreciated. Thanks!
Last edited by guixxx on July 12th, 2018, 7:08 pm, edited 1 time in total.

max
Forum team
Posts: 755
Joined: January 15th, 2013, 3:43 pm

Re: "exception: Bad song index" when opening valid m3u playlist?

Post by max » July 12th, 2018, 9:52 am


guixxx
Posts: 4
Joined: July 11th, 2018, 9:18 pm

Re: "exception: Bad song index" when opening valid m3u playlist?

Post by guixxx » July 12th, 2018, 5:29 pm

mpd --version:

Code: Select all

Music Player Daemon 0.20.20

Copyright (C) 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright 2008-2017 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 nfs curl

Neighbor plugins:
 smbclient upnp

Decoders plugins:
 [mad] mp3 mp2
 [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
 [faad] aac
 [wavpack] wv
 [modplug] 669 amf ams dbm dfm dsm far it med mdl mod mtm mt2 okt s3m stm ult umx xm
 [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 pulse jack httpd recorder

Encoder plugins:
 null vorbis opus lame wave flac

Archive plugins:
 [bz2] bz2
 [zzip] zip

Input plugins:
 file alsa archive curl ffmpeg smbclient nfs mms

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

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

Other features:
 avahi epoll icu inotify ipv6 systemd tcp un

max
Forum team
Posts: 755
Joined: January 15th, 2013, 3:43 pm

Re: "exception: Bad song index" when opening valid m3u playlist?

Post by max » July 12th, 2018, 5:44 pm

I give up, because I won't repeat myself again. Good luck with your problem.

guixxx
Posts: 4
Joined: July 11th, 2018, 9:18 pm

Re: "exception: Bad song index" when opening valid m3u playlist?

Post by guixxx » July 12th, 2018, 6:19 pm

I don't follow.

guixxx
Posts: 4
Joined: July 11th, 2018, 9:18 pm

Re: "exception: Bad song index" when opening valid m3u playlist?

Post by guixxx » July 14th, 2018, 10:32 pm

[SOLVED]

If I delete ../ off the song path, it works on MPD but it won't work on any other player. Even if I point playlist_directory to somewhere else, and I manually try to load the playlist located at /run/media/gui/SEAGATE/Multimedia/Music/Playlists/ using the ncmpcpp file browser, MPD is still unable to load any songs because of the ../ in the song path. I suppose that happens because MPD resolves paths relative to music_directory instead of playlist_directory, that's why I have to remove the ../. If my assumptions are correct, that's probably by design and probably won't be changed.

TL;DR: I've switched to cmus.

max
Forum team
Posts: 755
Joined: January 15th, 2013, 3:43 pm

Re: "exception: Bad song index" when opening valid m3u playlist?

Post by max » July 15th, 2018, 8:13 pm

The playlist directory is an opaque directory of files managed by MPD, to be edited with MPD commands. You can put playlist files anywhere inside the music directory if you want custom playlists.

Unfortunately, your support request did not have enough information to be able to point you to that mistake. Only now did you post a rough explanation of what you did, after leaving MPD behind. You made helping you difficult and time-consuming, and after your refusal to follow the instructions, I chose not to spend any further time on your problem.

I'm happy you're now using a different software.

Post Reply