0

Having problems finding how to add songs to playlist on Raspberry PI (Jessie Lite)

When I am trying to add file, either giving directory name or file it says :

mpd.base.CommandError: [50@0] {add} Not found or "bad URI"

I changed the music directory in mpd.conf to home directory but it didn't help. Can i change MPD music directory from Python?

    from mpd import MPDClient
    client = MPDClient()
    client.connect("localhost", 6600)
    client.update()
    //client.add("music/")
    client.add("file.mp3")

Aim is just to manage playlist, create and remove songs on demand with python

Zhubei Federer
  • 1,274
  • 2
  • 10
  • 27
Darius
  • 596
  • 1
  • 6
  • 22

1 Answers1

0

Answer was found here https://stackoverflow.com/a/37632225/2838794

sudo nano /etc/mpd.conf

Inside file:

bind_to_address     "/run/mpd/socket"

After saving the file

export MPD_HOST=/run/mpd/socket
systemctl restart mpd
Darius
  • 596
  • 1
  • 6
  • 22