1 <?xml version='1.0' encoding='UTF-8'?>
5 -''-param man.charmap.use.subset "0" \
6 -''-param make.year.ranges "1" \
7 -''-param make.single.year.ranges "1" \
8 /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl \
11 A manual page <package>.<section> will be generated. You may view the
12 manual page with: nroff -man <package>.<section> | less'. A typical entry
13 in a Makefile or Makefile.am is:
15 DB2MAN = /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
16 XP = xsltproc -''-nonet -''-param man.charmap.use.subset "0"
18 manpage.1: manpage.xml
21 The xsltproc binary is found in the xsltproc package. The XSL files are in
22 docbook-xsl. A description of the parameters you can use can be found in the
23 docbook-xsl-doc-* packages. Please remember that if you create the nroff
24 version in one of the debian/rules file targets (such as build), you will need
25 to include xsltproc and docbook-xsl in your Build-Depends control field.
26 Alternatively use the xmlto command/package. That will also automatically
27 pull in xsltproc and docbook-xsl.
29 Notes for using docbook2x: docbook2x-man does not automatically create the
30 AUTHOR(S) and COPYRIGHT sections. In this case, please add them manually as
31 <refsect1> ... </refsect1>.
33 To disable the automatic creation of the AUTHOR(S) and COPYRIGHT sections
34 read /usr/share/doc/docbook-xsl/doc/manpages/authors.html. This file can be
35 found in the docbook-xsl-doc-html package.
37 Validation can be done using: `xmllint -''-noout -''-valid manpage.xml`
39 General documentation about man-pages and man-page-formatting:
40 man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/
45 <!ENTITY dhsection "5">
46 <!ENTITY dhpackage "mpd-sima">
47 <!ENTITY dhutils "mpd_sima.cfg">
51 <refentry xmlns="http://docbook.org/ns/docbook"
52 xmlns:xi="http://www.w3.org/2001/XInclude" version="5.0">
53 <xi:include href="info.xml" />
55 <refentrytitle>&dhutils;</refentrytitle>
56 <manvolnum>&dhsection;</manvolnum>
59 <refname>&dhutils;</refname>
60 <refpurpose>&dhpackage; will try to maintain some titles ahead in the queue
61 following different policies. This manual document the
62 configuration file for &dhpackage;.</refpurpose>
64 <refsect1 id="description">
65 <title>DESCRIPTION</title>
66 <para>This manual page documents briefly <command>&dhpackage;</command>
67 configuration options available in user configuration file
68 (see <xref linkend="files"/>).</para>
70 <refsect1 id="examples">
71 <title>EXAMPLES</title>
74 <title>Default queue mode, similar artist.</title>
79 <title>File tags queue mode (offline mode).</title>
80 <para>Here is an example of autoqueue using file tags only.</para>
81 <programlisting><xi:include href="tags.cfg" parse="text" />
85 <title>Album queue mode using last.fm recommendations (online mode).</title>
86 <para>Here is an example of album queue configuration using online recommendations system.</para>
87 <programlisting><xi:include href="album.cfg" parse="text" />
92 <refsect1 id="options">
93 <title>Configuration file</title>
94 <para>The configuration file consists of sections, led by a
95 <command>[section]</command> header and followed by <option>name: value</option>
96 entries, with continuations in the style of RFC 822 (see section
97 3.1.1, “LONG HEADER FIELDS”); <option>name=value</option> is also accepted. Lines
98 beginning with <parameter>'#'</parameter> or <parameter>';'</parameter>
99 are ignored and may be used to provide comments (<emphasis>Nota
100 Bene:</emphasis> inline comment are possible using <parameter>'#'</parameter>).</para>
101 <title>OPTIONS</title>
102 <para>The default values are used in the options lists below.</para>
104 <title>MPD section</title>
105 <para>This section is meant to configure MPD access, MPD host
106 address / port and password if necessary.</para>
108 <!-- Use the variablelist.term.separator and the
109 variablelist.term.break.after parameters to
110 control the term elements. -->
111 <varlistentry> <!-- MPD -->
112 <term><option>[MPD]</option></term>
113 <listitem></listitem>
115 <varlistentry> <!-- MPD.host -->
116 <term><option>host=</option><replaceable>localhost</replaceable></term>
118 <para>Set MPD host. Use IP or FQDN.</para>
121 <varlistentry> <!-- MPD.port -->
122 <term><option>port=</option><replaceable>6600</replaceable></term>
124 <para>Set host port to access MPD to.</para>
127 <varlistentry> <!-- MPD.password -->
128 <term><option>password=</option><replaceable>s3cr3t</replaceable></term>
130 <para>Set MPD password to use. Do not use this option
131 if you don't have enabled password protected access
132 on your MPD server.</para>
138 <title>log section</title>
139 <para>Configure logging.</para>
141 <varlistentry> <!-- LOG -->
142 <term><option>[log]</option></term>
143 <listitem><para></para></listitem>
145 <varlistentry> <!-- log.logfile -->
146 <term><option>logfile=</option></term>
148 <para>File to log to, usually in dæmon mode.<sbr />Default
149 (empty or unset) is to log to stdin/stdout.</para>
152 <varlistentry> <!-- log.verbosity -->
153 <term><option>verbosity=</option><replaceable>info</replaceable></term>
155 <para>Logging verbosity among
156 <replaceable>debug</replaceable>,
157 <replaceable>info</replaceable>,
158 <replaceable>warning</replaceable>,
159 <replaceable>error</replaceable>.</para>
164 <refsect2 id="daemon">
165 <title>Process daemonization</title>
166 <para>Configure process daemon.</para>
168 <varlistentry> <!-- DAEMON -->
169 <term><option>[daemon]</option></term>
170 <listitem><para></para></listitem>
172 <varlistentry> <!-- daemon.daemon -->
173 <term><option>daemon=false</option></term>
175 <para>whether to daemonize process or not.</para>
178 <varlistentry> <!-- daemon.pidfile -->
179 <term><option>pidfile=</option></term>
181 <para>Where to store process ID.</para>
187 <title>sima section</title>
188 <para>Core &dhutils; configuration.</para>
190 <varlistentry> <!-- SIMA -->
191 <term><option>[sima]</option></term>
192 <listitem><para></para></listitem>
195 <varlistentry> <!-- sima.contrib -->
196 <term><option>contrib=</option><replaceable></replaceable></term>
201 <varlistentry> <!-- sima.internal -->
202 <term><option>internal=</option><replaceable>Lastfm, Random, Crop</replaceable></term>
204 <para>&dhpackage;'s plugin management for internal source plugin
205 and contrib (ie. external plugins).<sbr /> Plugins list is a
206 comma separated string list.<sbr /> Optional plugin's
207 configuration lays in its own section.<sbr />For instance a
208 "AwesomePlugin" declared here gets its configuration from the
209 corresponding section "[awesomeplugin]".
211 <para>The default list of plugins to load at startup: <option>Lastfm</option>,<option>Random</option>,<option>Crop</option>.<sbr />
212 <option>Crop</option> is an utility plugin, it does not queue any tracks (cf. below).<sbr />
213 <option>Random</option> will queue a track at random if other plugins did not return any tracks.<sbr />
215 <para>You can add, combine here as many plugins you want.<sbr />
216 The priority may be used to order them.
220 <varlistentry> <!-- sima.history_duration -->
221 <term><option>history_duration=</option><replaceable>8</replaceable></term>
223 <para>How far to look back in history to avoid to play
224 twice the same track/title (duration in
226 The <option>history_duration</option> is also used to give priority to not recently played artists.
230 <varlistentry> <!-- sima.queue_length -->
231 <term><option>queue_length=</option><replaceable>2</replaceable></term>
233 <para>Threshold value triggering queue process.</para>
236 <varlistentry> <!-- sima.musicbrainzid -->
237 <term><option>musicbrainzid=</option><replaceable>true</replaceable></term>
239 <para>Use MusicBrainzIdentifier to search music (mainly
241 Default is True, switch to False if you don't have
242 MusicBrainzIdentifier set for at least 80% of you
243 music library.<sbr /> Consider using these metadata as it
244 enhances a lot artist/album/tracks identification.
245 Use Picard to tag your file: <ulink url="https://picard.musicbrainz.org/"/>.
249 <varlistentry> <!-- sima.repeat_disable_queue -->
250 <term><option>repeat_disable_queue=</option><replaceable>true</replaceable></term>
252 <para>Prevent disabling queuing in repeat play mode.
256 <varlistentry> <!-- sima.single_disable_queue -->
257 <term><option>single_disable_queue=</option><replaceable>true</replaceable></term>
259 <para>Prevent disabling queuing in single play mode.
267 <title>Crop section</title>
268 <para>crop plugin's configuration:</para>
269 <varlistentry> <!-- crop -->
270 <term><option>[crop]</option></term>
272 <varlistentry> <!-- crop.consume -->
273 <term><option>consume=</option><replaceable>10</replaceable></term>
275 <para>How many played tracks to keep in the queue.
276 Allows you to maintain a fixed length queue.
277 Set to some negative integer to keep all played tracks.
281 <varlistentry> <!-- crop.priority -->
282 <term><option>priority=</option><replaceable>10</replaceable></term>
290 <refsect2 id="random">
291 <title>Random section</title>
292 <para>When no similar tracks are found, falling back to random queuing.</para>
293 <para>Random plugin's configuration:</para>
294 <varlistentry> <!-- random -->
295 <term><option>[random]</option></term>
297 <varlistentry> <!-- random.track_to_add -->
298 <term><option>track_to_add=</option><replaceable>1</replaceable></term>
300 <para>How many track(s) to add.</para>
303 <varlistentry> <!-- random.flavour -->
304 <term><option>flavour=</option><replaceable>sensible</replaceable></term>
306 <para>Different mode, aka random flavour,
308 <replaceable>pure</replaceable>,
309 <replaceable>sensible</replaceable>,
310 <itemizedlist mark='bullet'>
312 <para><replaceable>pure</replaceable>, pure random choice, even among recently played track.
316 <para><replaceable>sensible</replaceable>, use play history to filter chosen tracks.
323 <varlistentry> <!-- random.priority -->
324 <term><option>priority=</option><replaceable>50</replaceable></term>
332 <refsect2 id="lastfm">
333 <title>LastFm section</title>
334 <para>LastFM plugin's configuration.</para>
336 <varlistentry> <!-- lastfm -->
337 <term><option>[lastfm]</option></term>
339 <varlistentry> <!-- lastfm.queue_mode -->
340 <term><option>queue_mode=</option><replaceable>track</replaceable></term>
342 <para>Queue mode to use among
343 <replaceable>track</replaceable>,
344 <replaceable>top</replaceable> and
345 <replaceable>album</replaceable> (see <xref linkend="queue_mode"/> for info about queue modes).</para>
348 <varlistentry> <!-- lastfm.max_art -->
349 <term><option>max_art=</option><replaceable>10</replaceable></term>
351 <para>Maximum number of similar artist to retrieve from local
352 media library.<sbr />When set to something superior
353 to zero, it tries to get as much similar artists
354 from media library.</para>
357 <varlistentry> <!-- lastfm.depth -->
358 <term><option>depth=</option><replaceable>1</replaceable></term>
360 <para>How many artists to base on similar artists
361 search.<sbr /> The first is the last played artist
362 and so on back in the history. Highter depth
363 generates wider suggestions, it might help to
364 reduce looping over same artists.
368 <varlistentry> <!-- lastfm.single_album -->
369 <term><option>single_album=</option><replaceable>false</replaceable></term>
371 <para>Prevent from queueing a track from the same album
372 (it often happens with OST).<sbr />
373 Only relevant in "track" queue mode.</para>
376 <varlistentry> <!-- lastfm.track_to_add -->
377 <term><option>track_to_add=</option><replaceable>1</replaceable></term>
379 <para>How many track(s) to add. Only relevant in
380 <option>top</option> and <option>track</option>
381 queue modes. This is actually an upper limit,
382 min(<option>max_art</option>,
383 <option>track_to_add</option>) will be used.</para>
386 <varlistentry> <!-- lastfm.album_to_add -->
387 <term><option>album_to_add=</option><replaceable>1</replaceable></term>
389 <para>How many album(s) to add. Only relevant in
390 <option>album</option> queue modes.</para>
393 <varlistentry> <!-- lastfm.track_to_add_from_album -->
394 <term><option>track_to_add_from_album=</option><replaceable>0</replaceable></term>
396 <para>How many track(s) to add from each selected albums. Only relevant in
397 <option>album</option> queue modes. When set to 0 or lower the whole album is queued.
401 <varlistentry> <!-- lastfm.cache -->
402 <term><option>cache=</option><replaceable>True</replaceable></term>
404 <para>Whether or not to use on-disk persistent http
405 cache.<sbr />When set to "true", sima will use a
406 persistent cache for its http client. The cache is
407 written along with the dbfile in:<sbr />
408 <filename>$XDG_DATA_HOME/mpd_sima/http/WEB_SERVICE</filename>.<sbr/>
409 If set to "false", caching is still done but in memory.
413 <varlistentry> <!-- lastfm.priority -->
414 <term><option>priority=</option><replaceable>100</replaceable></term>
423 <refsect2 id="genre">
424 <title>Genre section</title>
425 <para>Genre plugin's configuration.</para>
426 <para>This plugin permits offline autoqueuing based on files genre tag only.</para>
427 <para>it will try to queue tracks base on genre tags of tracks in the queue.</para>
428 <varlistentry> <!-- genre -->
429 <term><option>[genre]</option></term>
431 <varlistentry> <!-- tags.queue_mode -->
432 <term><option>queue_mode=</option><replaceable>track</replaceable></term>
434 <para>Queue mode to use among
435 <replaceable>track</replaceable>,
436 <replaceable>album</replaceable> (see <xref linkend="queue_mode"/> for info about queue modes).</para>
439 <varlistentry> <!-- genre.single_album -->
440 <term><option>single_album=</option><replaceable>false</replaceable></term>
442 <para>Prevent from queueing a track from the same album
443 (it often happens with OST).<sbr />
444 Only relevant in "track" queue mode.</para>
447 <varlistentry> <!-- genre.priority -->
448 <term><option>priority=</option><replaceable>80</replaceable></term>
455 <varlistentry> <!-- genre.track_to_add -->
456 <term><option>track_to_add=</option><replaceable>1</replaceable></term>
458 <para>How many track(s) to add.</para>
461 <varlistentry> <!-- genre.album_to_add -->
462 <term><option>album_to_add=</option><replaceable>1</replaceable></term>
464 <para>How many album(s) to add. Only relevant in
465 <option>album</option> queue mode.</para>
470 <title>Tags section</title>
471 <para>Tags plugin's configuration. There is no default configuration for this plugin,
472 it does not work out of the box.</para>
473 <para>This plugin permits offline autoqueuing based on files tags only. Supported tags are
474 <option>'comment'</option>, <option>'date'</option>, <option>'genre'</option>,
475 <option>'label'</option> and <option>'originaldate'</option>.</para>
476 <para>In addition to supported tags above you can use an MPD filter. Please refer to
477 MPD protocol documentation for more.</para>
478 <para>All tag entries in this section are ANDed as a single MPD filter to look for titles
479 in the library. Moreover, for each tags, comma separated values are also ORed.<sbr />
480 For instance setting "<option>genre=rock</option>" and
481 "<option>date=1982,1983,1984,1985,1986,1987,1988,1989</option>"
482 will end up looking for track tagged with genre <option>rock</option>
483 and date within 1982 through 1989.<sbr />
484 Using an MPD filter to replace <option>date</option> you can achieve
485 the same with the following setting: "<option>genre=rock</option>" and
486 "<option>filter=(date =~ '198[2-9]+')</option>" (provided your MPD server
487 was compiled with libpcre).
489 <varlistentry> <!-- tags -->
490 <term><option>[tags]</option></term>
492 <varlistentry> <!-- tags.queue_mode -->
493 <term><option>queue_mode=</option><replaceable>track</replaceable></term>
495 <para>Queue mode to use among
496 <replaceable>track</replaceable>,
497 <replaceable>album</replaceable> (see <xref linkend="queue_mode"/> for info about queue modes).</para>
500 <varlistentry> <!-- tags.single_album -->
501 <term><option>single_album=</option><replaceable>false</replaceable></term>
503 <para>Prevent from queueing a track from the same album
504 (it often happens with OST).<sbr />
505 Only relevant in "track" queue mode.</para>
508 <varlistentry> <!-- tags.filter -->
509 <term><option>filter=</option></term>
511 <para>You can use here any valid MPD filter as defined in MPD protocol documentation.</para>
514 <varlistentry> <!-- tags.comment -->
515 <term><option>comment=</option></term>
517 <varlistentry> <!-- tags.date -->
518 <term><option>date=</option></term>
520 <varlistentry> <!-- tags.genre -->
521 <term><option>genre=</option></term>
523 <varlistentry> <!-- tags.label -->
524 <term><option>label=</option></term>
526 <varlistentry> <!-- tags.originaldate -->
527 <term><option>originaldate=</option></term>
529 <varlistentry> <!-- tags.priority -->
530 <term><option>priority=</option><replaceable>80</replaceable></term>
537 <varlistentry> <!-- tags.track_to_add -->
538 <term><option>track_to_add=</option><replaceable>1</replaceable></term>
540 <para>How many track(s) to add.</para>
543 <varlistentry> <!-- tags.album_to_add -->
544 <term><option>album_to_add=</option><replaceable>1</replaceable></term>
546 <para>How many album(s) to add. Only relevant in
547 <option>album</option> queue mode.</para>
552 <refsect1 id="queue_mode">
553 <title>QUEUE MODES</title>
554 <para>Different queue modes are available with some plugins (check for
555 <option>queue_mode</option> presence in plugin config).
557 <para>&dhpackage; tries preferably to chose among unplayed artists or
558 at least not recently played artist.</para>
561 <term><option>track</option></term>
563 <para>Queue a similar track chosen at random from a similar artist.</para>
567 <term><option>top</option></term>
569 <para>Queue a track from a similar artist, chosen among
570 "top tracks" according to last.fm data mining.</para>
574 <term><option>album</option></term>
576 <para>Queue a whole album chosen at random from a similar artist.</para>
577 <para><emphasis>Nota Bene:</emphasis><sbr /> Due to the
578 track point of view of database build upon tracks tags
579 an album lookup for a specific artist will return
580 albums as soon as this artist appears in a single track
582 For instance looking for album from "The Velvet
583 Underground" will fetch "Last Days" and "Juno" OSTs
584 because the band appears on the soundtrack of these two
586 A solution is for you to set AlbumArtists tag to
587 something different than the actual artist of the
588 track. For compilations, OSTs etc. a strong convention
589 is to use "Various Artists" for this tag.</para>
590 <para>&dhpackage; is currently looking for AlbumArtists tags
591 and avoid album where this tag is set with "Various
592 Artists". If a single track within an album is found
593 with AlbumArtists:"Various Artists" the complete album
594 is skipped and won't be queued.</para>
599 <xi:include href="files.xml" />
600 <xi:include href="feedback.xml" />
601 <xi:include href="seealso.xml" />
603 <!-- vim: tabstop=4 softtabstop=4 shiftwidth=4 :