Go to file
Nicolas Wavrant c99bdb77a5 Add README.md 2017-08-21 10:23:57 +00:00
mpdcontroller Get song status regularly 2017-07-29 21:14:44 +02:00
README.md Add README.md 2017-08-21 10:23:57 +00:00
setup.py version up 2017-07-29 21:52:57 +02:00

README.md

django-mpdcontroller is a django application acting as a wrapper over mpc (the mpd controller), and providing a simple web page to control a mpd server.

How to use

  1. Add mpdcontroller to the list of INSTALLED_APPS in your django's project setup.py.
  2. Set up the application preferences, as described in this README section

Application preferences

You have to configure the application with the given parameters :

Parameter name Description
MPD_HOST_URL Absolute path to the mpd unix socket, or control URL (see mpd documentation/man page)(yes, the control URL works too
MPD_HTTP_OUTPUT_URL URL of the web interface of mpd (ie: http://exemple.com:8000/mpd.ogg)

FAQ

Why wrapping mpc and not using it locally to control directly mpd via the control port ?

MPD's controller proved itself to be not reliable : regularly the service listening on the TCP port crashed, forcing me to SSH to my server to restart mpd. The reliable solution happened to control mpd via a unix socket, thus puppeting a mpc binary located on the same server as mpd (socket SSH tunneling could work, but opening a SSH connection everytime I want to change the music playing is a pain).

Why wrapping mpc and not using some other mpd client library ?

First time I wrote this program, the libraries I tried didn't support unix socket (I know it changed since then). Also, I want something that just work, so instead of adding one more layer of software, I prefered using something that proved itself reliable : mpc.

Credits

https://www.musicpd.org/ : MPD, an amazingly useful peace of software