You are not logged in.

#1 2010-12-26 21:54:38

sigma91
Member
Registered: 2010-07-31
Posts: 18

[SOLVED] MPD: empty playlist

Hi,

I just installed and configured MPD, but I'm not able to play anything. There are simply no items in my playlist. This is what I did so far:

- I installed MPD using pacman
- I adjusted /etc/mpd.conf according to the official wiki. This is what it looks like atm:

music_directory         "/home/sigma/music2"
playlist_directory "/var/lib/mpd/playlists"
db_file "/var/lib/mpd/mpd.db"
log_file "/var/log/mpd/mpd.log"
pid_file "/var/run/mpd/mpd.pid"
state_file "/var/lib/mpd/mpdstate"
user "mpd"

input {
        plugin "curl"
}

audio_output { 
         type                    "alsa"
         name                    "My ALSA Device"
         device                  "hw:0,0"     # optional
         format                  "44100:16:2" # optional
}

I checked that any file and directory existed. I put 2 mp3's in the directory /home/sigma/music2. I added the section audio_output after I saw it didn't work. You can't find that at the arch linux wiki, but here.

- I started mpd: '/etc/rc.d/mpd start'

- I started ncmpcpp and pressed 'u' for a database update.

Unfortunately, there are still no items in my playlist.

Last edited by sigma91 (2010-12-27 12:07:53)

Offline

#2 2010-12-26 22:44:30

archman-cro
Member
From: Croatia
Registered: 2010-04-04
Posts: 943
Website

Re: [SOLVED] MPD: empty playlist

Erm, you should go into the browse mode (in ncmpcpp) with "3" and press space on the desired album you want to appear in the playlist. Then press "2" to view your playlist.

I hope my post isn't completely useless. big_smile

Offline

#3 2010-12-26 23:03:28

sigma91
Member
Registered: 2010-07-31
Posts: 18

Re: [SOLVED] MPD: empty playlist

I tried that, but in browse mode I just see 'browse: /' and nothing else is displayed. According to the wiki, I should create the database first:

Creating the database is now accomplished via the update feature of the client, for example if you were running ncmpcpp you would just enter 'u'.

but for some reason, all the files are still not accessible.

Last edited by sigma91 (2010-12-26 23:04:10)

Offline

#4 2010-12-26 23:17:44

archman-cro
Member
From: Croatia
Registered: 2010-04-04
Posts: 943
Website

Re: [SOLVED] MPD: empty playlist

Try issuing "mpd --create-db" even though you tried "u" in ncmpcpp.

Offline

#5 2010-12-26 23:19:59

sigma91
Member
Registered: 2010-07-31
Posts: 18

Re: [SOLVED] MPD: empty playlist

# mpd --create-db

** (mpd:31922): CRITICAL **: option parsing failed: Unknown option --create-db

Offline

#6 2010-12-26 23:28:13

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [SOLVED] MPD: empty playlist

mpd automatically creates databases upon start now.

Check /var/log/mpd/mpd.log for any errors.

Offline

#7 2010-12-27 00:12:59

sigma91
Member
Registered: 2010-07-31
Posts: 18

Re: [SOLVED] MPD: empty playlist

There wasn't anything interesting until I set log_level to "verbose":

Dec 27 01:07 : avahi: Initializing interface
Dec 27 01:07 : avahi: Client changed to state 101
Dec 27 01:07 : avahi: Client is CONNECTING
Dec 27 01:07 : state_file: Loading state file /var/lib/mpd/mpdstate
Dec 27 01:07 : inotify: initializing inotify
Dec 27 01:07 : inotify: inotify_add_watch() has failed: Permission denied

Sounds like a rights management problem to me, but I can't figure out what could possibly be wrong. For testing purposes, I set all rights to the directory containing the music, it didn't change anything. user mpd is also in users and audio group.

Offline

#8 2010-12-27 00:19:18

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [SOLVED] MPD: empty playlist

I set mine up as my user instead of the mpd user. This is all of the uncommented stuff:

music_directory        "~/music"
playlist_directory        "~/.mpd/playlists"
db_file            "~/.mpd/mpd.db"
log_file            "~/.mpd/mpd.log"
pid_file            "~/.mpd/mpd.pid"
state_file            "~/.mpd/state"
user                "skottish"
bind_to_address        "127.0.0.1"
bind_to_address      "/home/skottish/.mpd/socket"

input {
        plugin "curl"
}

Offline

#9 2010-12-27 00:36:41

sigma91
Member
Registered: 2010-07-31
Posts: 18

Re: [SOLVED] MPD: empty playlist

Thanks, I did the same. MPD couldn't start after the file has been altered, but it did after a reboot. Now I have access to any files.

Last edited by sigma91 (2010-12-27 00:37:10)

Offline

#10 2010-12-27 03:16:20

archman-cro
Member
From: Croatia
Registered: 2010-04-04
Posts: 943
Website

Re: [SOLVED] MPD: empty playlist

sigma91, you can mark the thread as solved now by editing your first post and putting [SOLVED] in front of the thread name.

Cheers!

Offline

#11 2010-12-27 08:30:06

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [SOLVED] MPD: empty playlist

skottish wrote:

I set mine up as my user instead of the mpd user. This is all of the uncommented stuff:

music_directory        "~/music"
playlist_directory        "~/.mpd/playlists"
db_file            "~/.mpd/mpd.db"
log_file            "~/.mpd/mpd.log"
pid_file            "~/.mpd/mpd.pid"
state_file            "~/.mpd/state"
user                "skottish"
bind_to_address        "127.0.0.1"
bind_to_address      "/home/skottish/.mpd/socket"

input {
        plugin "curl"
}

and this is exactly how it should be done. using the "mpd" user and having the music in your own users home folder is plain stupid. The wiki should really highlight this. I will probably change it later today.

Last edited by Rasi (2010-12-27 08:30:34)


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#12 2010-12-27 11:50:54

sigma91
Member
Registered: 2010-07-31
Posts: 18

Re: [SOLVED] MPD: empty playlist

I actually followed this advice:

Please have a look at the official page for setup and troubleshooting instructions, the main developer called our wiki page in its current state "full of symptom killers", hence the official pages should contain better instructions.

But I failed already at this step, as it is described here:

/etc/rc.d/mpd create-db

Because this command is not found. So I figured I rather stick with the arch linux wiki for now.

Offline

Board footer

Powered by FluxBB