The configuration file’s location is specified on the mppopmd
command-line (using the -c flag). It takes the form of a LISP
S-expression in which each top-level configuration item is a cons
cell. LISP comments will be ignored.
General-purpose items:
host
The network address on which the MPD daemon is
listening. It should match bind_to_address
in your MPD
configuration file. The default value is "localhost".
port
The TCP port on which the MPD daemon is listening. This
should match the port
setting in your MPD configuration
file. The default value is 6600.
local_music_dir
The root of your MPD music directory, as seen
from this host. This will be used to evaluate the %full-file
and %current-file
replacement parameters when executing
commands (on which more see below).
log
The file to which the daemon will log when running in the
background (if you specify the -F flag, to run it in the
foreground, it will log to stdout
); no log rotation is
provided, so setup logrotate
, run it under systemd
(see see below) or keep an eye on it so it
doesn’t grow too large.
commands_chan
The name of the MPD channel on which
mppopmd
shall listen for commands ("unwoundstack.com:commands"
by default).
Configuration items related to maintaining play counts & last-played timestamps:
playcount_sticker
The sticker name mpdpopm
will use to
store play counts (defaults to "unwoundstack.com:playcount").
lastplayed_sticker
The sticker name mpdpopm will use to store
the last played timestamp (defaults to "unwoundstack.com:lastplayed")
played_thresh
The percentage of a song’s duration that must be
played back in order for it to be considered as "played", expressed as
number between 0 & 1 (defaults to 0.6).
poll_interval_ms
The amount of time, in milliseconds, between
polls of MPD by mppopmd
to check on playback progress. This is
the error bound on detection of song having been “played” in that if
a poll is performed the instant before the current song’s playback
reaches played_thresh
, it may be up to this many milliseconds
before mppopmd
tries again and belatedly determines that the
current track has been “played” (and hence updates the playcount,
last played time &c). Since this is not, in general, a time-sensitive
operation, the default setting is 5000 (i.e. five seconds) to keep
network traffic down.
playcount_command
An optional name of a program to run when the
play count is incremented; this should be an absolute path. Use
playcount_command_args
to specify arguments to this
command. The intent behind this feature is to enable the user to keep
other data stores (such as ID3 tags) up-to-date with play count
information (on which more see below)
playcount_command_args
An array of arguments to specify to the
playcount command; arguments may contain replacement parameters that
will be filled in at the time of execution.
Configuration items related to ratings:
rating_sticker
The sticker name mppopmd
will use to
store the rating (defaults to "unwoundstack.com:rating").
ratings_command
An optional name of a program to run when the
rating is set; this should be an absolute path. Use
ratings_command_args
to specify arguments to this command. The
intent behind this feature is to enable the user to keep other data
stores (such as ID3 tags) up-to-date with play count information (on
which more see below).
ratings_command_args
An array of arguments to specify to the
ratings command; arguments may contain replacement parameters that
will be filled in at the time of execution.
Finally, the configuration for generalized commands is not described here, but rather under Generalized Commands.
mpdpopm
ships with a minimal sample configuration file. A more
expansive sample appears at the end of this manual (see Sample Configuration File).