A client for MPD using CGI-BIN and BASH
Using BASH to create a quick web based lyrics/art view of a playing MPD instance, and using BASH and CGI to implement a web-based remote control for MPD.
Originally, this repository just had the CGI implementation (cgimpd
) of a
remote control. Currently, it holds both that and a small script (mpdview.sh
)
that creates a lightweight web page that has information about what’s playing.
There’s a lot - a lot - of different web UIs for MPD. However, they often rely on PHP, databases, don’t have a feature I need (such as cover art), or have features I didn’t need (a separate webserver). So I decided to make this for a fast, basic, but featureful remote control/status implementation.
cgimpd
can be installed on a remote webserver from the MPD instance.
While I love ompd and rompr,
I wanted something I could easily pull up and show folks when they asked
what song was playing - or even leave up in the background without worrying
that someone would accidentally click a button or press a key. mpdview
does not require cgi; it runs separately on the server machine.
mpdview
can also be installed on a remote webserver from the MPD instance.
This project is licensed under the MIT License. For the full license, see LICENSE
.
Download or clone the repository, and put the uncompressed files in a location of your choice. Change into that directory.
Configure cgimpd.rc
hostname.of.mpd
1485 < - mpd port
password
5 < - refresh in seconds
/directory/of/music
/directory/for/covers
/www/base/directory
http://url.to/refresh/to/
/directory/for/fanart
/directory/for/artistart
I utilize my WebServer Covers script so that my whole music collection doesn’t have to be inside of webroot. You can, of course, symlink your music collection inside of webroot, but that just makes me uneasy.
mpdview
only:
out
below the script directoryout
to somewhere in your webrootmpdview.sh &
images
if fanart, artist art, or album art is
not found[song filename].txt
.Band Name.jpg
.cgimpd
only:Format of .htaccess
#Alternate default index page
DirectoryIndex mpd.cgi
AddHandler cgi-script .cgi
Options +ExecCGI
<Files "cgimpd.rc">
Order Deny,Allow
Deny from all
</Files>
Steven Saus injects people with radioactivity for his day job, but only to serve the forces of good.
Mostly.