Content-type: text/html Man page of MPD-HITS

MPD-HITS

Section: User Commands (1)
Updated: JUNE 2015
Index Return to Main Contents

 

NAME

mpd-hits - collect playback statistics of Music Player Daemon

 

SYNOPSIS

mpd-hits [OPTION]...

 

DESCRIPTION

mpd-hits is a program collecting information about tracks played by Music Player Daemon. It can be run either as daemon or as a foreground process.

The information about played tracks (such as artist, song title, etc) is stored in plain text files, so it can be viewed/edited directly and processed easily by standard command line tools. Also, statistics can be parsed using a dedicated utility mpd-hits-report(1).

Being run in a shell, mpd-hits displays information about a track currently played by MPD and makes a notification each time a track was added to the mpd-hits DB (see OPERATION below). If run as a daemon, mpd-hits' messages will be sent to the system log (only start/termination timestamps and connection status will be reported).

mpd-hits reads its configuration options in the folowing sequence: defaults, configuration file, environment variables, command line arguments. Each subsequent option, if specified, overrides a previous one.

 

OPTIONS

-d, --daemon
Run as a daemon. mpd-hits would run in a shell by default.
-c, --check-running
Report if mpd-hits is running already and quit (see --lock-directory option also). (Returns 0 if mpd-hits is running or 1 if not.)
-k, --kill
Terminate the currently running mpd-hits process. The PID of the process to kill will be taken from the lock file (see --lock-directory option also).
--host=MPDHOST
Poll MPD on the specified host. Default is "localhost".
--port=MPDPORT
Poll MPD on the specified port. Default is "6600".
--password=MPDPASSW
Use the specified string as a password to connect to MPD.
--user=USERNAME
Run mpd-hits with permissions of this user.
--group=GROUPNAME
Run mpd-hits with permissions of this group.
--lock-directory=LOCKDIR
Use LOCKDIR as a lock directory. The file named mpd-hits.pid containing a PID of currently running mpd-hits instance will be placed there. Default is /var/run/mpd-hits.
--db-directory=DBDIR
Use DBDIR as the database directory. The history of MPD playbacks will be stored there in plain text, human-readable files. Default is /var/lib/mpd-hits.
-h, --help
Print usage summary and quit.
-V, --version
Print program version info and quit.

 

OPERATION

mpd-hits polls MPD once a second and retrieves information about track currently played.

It is important to understand, that a track will be counted as played and added to the DB only after it remained in a playing state for more than a half of its full duration. Thus, it is safe to search your collection by listening only parts of tracks - they will not get into the list of your favourites because of that.

If the currently playing track was paused, the playback stopwatch will be stopped until playback is resumed. If the currently playing track was stopped, the playback stopwatch will be reset to zero. One can run mpd-hits in the shell and play/pause/stop some tracks to see it in action: the notification message will appear as soon as a track has been added to the mpd-hits DB.

 

ENVIRONMENT

MPD_HOST
The host where MPD is running. Should contain either "host" or "password@host".
MPD_PORT
The port which MPD is listening.

 

FILES

/etc/mpd-hits.conf
Global configuration file.
/var/lib/mpd-hits/YYYY.MM
Playback statistics database files.
/var/run/mpd-hits/
Directory containing the mpd-hits PID file.

 

Configuration File Format

A configuration file contains key-value pairs separated by a space. Lines starting with '#' symbol are comments and will be ignored by the parser.

The following keys are supported:

HOST
The host where MPD is running.
PORT
The port which MPD is listening.
PASSWORD
This password will be sent to MPD. No password passed by default.
USER
mpd-hits will run with permissions of this user. Runs with current user's permissions by default.
GROUP
mpd-hits will run with permissions of this group. Runs with current group's permissions by default.
LOCK_DIRECTORY
The directory where mpd-hits stores its lock file. It is needed to forbid execution of several program instances at the same time.
DB_DIRECTORY
The directory where mpd-hits stores MPD statistics files.

 

AUTHOR

Dmitry Samoyloff

 

SEE ALSO

mpd-hits-report(1) mpd-hits-update(1)


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
OPERATION
ENVIRONMENT
FILES
Configuration File Format
AUTHOR
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 00:06:38 GMT, June 17, 2015