tsani / apollo

HTTP MPD integration for Labcoders Radio
MIT License
4 stars 0 forks source link

Apollo

Apollo is a webservice for interacting with an MPD instance and downloading music to it.

Features:

Setup

Build Apollo in a cabal sandbox. The bundled runserver.sh script can be used to launch the server. It takes as one argument the Apollo database directory to operate in. This directory must contain (at least) three items.

  1. music is the MPD music directory or a symlink thereto;
  2. transcoded is where Apollo stores transcoded tracks;
  3. archives is where Apollo stores music export archives.

To connect to MPD, Apollo takes command line arguments specifying the connection parameters. runserver.sh parses the MPD_HOST environment variable to construct the parameters to Apollo. If no MPD_HOST variable is set, then runserver.sh defaults to localhost with no password on port 6600. Recall that the MPD_HOST variable is of the form PASSWORD@HOST:PORT.

Usage

A number of scripts are bundled with this repository for some common Apollo workflows. The scripts generally require the jq and curl programs. The scripts expect an environment variable APOLLO_URL_BASE to be set, and to be of the form https://apollo.example.org:8080, i.e. consisting of the scheme and hostname (and optionally the port number).