]> kaliko git repositories - mpd-sima.git/blob - data/man/mpd_sima.cfg.5.xml
Document new offline autoqueue plugin based on file tags only
[mpd-sima.git] / data / man / mpd_sima.cfg.5.xml
1 <?xml version='1.0' encoding='UTF-8'?>
2 <!--
3
4 `xsltproc -''-nonet \
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 \
9           manpage.xml'
10
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:
14
15 DB2MAN = /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
16 XP     = xsltproc -''-nonet -''-param man.charmap.use.subset "0"
17
18 manpage.1: manpage.xml
19         $(XP) $(DB2MAN) $<
20
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.
28
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>.
32
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.
36
37 Validation can be done using: `xmllint -''-noout -''-valid manpage.xml`
38
39 General documentation about man-pages and man-page-formatting:
40 man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/
41
42 -->
43 <!DOCTYPE refentry [
44
45   <!ENTITY dhsection   "5">
46   <!ENTITY dhpackage "mpd-sima">
47   <!ENTITY dhutils "mpd_sima.cfg">
48
49 ]>
50
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" />
54   <refmeta>
55       <refentrytitle>&dhutils;</refentrytitle>
56       <manvolnum>&dhsection;</manvolnum>
57   </refmeta>
58     <refnamediv>
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>
63     </refnamediv>
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>
69     </refsect1>
70     <refsect1 id="examples">
71         <title>EXAMPLES</title>
72         <!--
73         <refsect2 id="track">
74             <title>Default queue mode, similar artist.</title>
75             <para></para>
76             <para></para>
77         </refsect2> -->
78         <refsect2 id="tags">
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" />
82             </programlisting>
83         </refsect2>
84         <refsect2 id="album">
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" />
88             </programlisting>
89         </refsect2>
90     </refsect1>
91
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>
103         <refsect2 id="MPD">
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>
107             <variablelist>
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>
114                 </varlistentry>
115                 <varlistentry> <!-- MPD.host -->
116                     <term><option>host=</option><replaceable>localhost</replaceable></term>
117                     <listitem>
118                         <para>Set MPD host. Use IP or FQDN.</para>
119                     </listitem>
120                 </varlistentry>
121                 <varlistentry> <!-- MPD.port -->
122                     <term><option>port=</option><replaceable>6600</replaceable></term>
123                     <listitem>
124                         <para>Set host port to access MPD to.</para>
125                     </listitem>
126                 </varlistentry>
127                 <varlistentry> <!-- MPD.password -->
128                     <term><option>password=</option><replaceable>s3cr3t</replaceable></term>
129                     <listitem>
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>
133                     </listitem>
134                 </varlistentry>
135             </variablelist>
136         </refsect2>
137         <refsect2 id="log">
138             <title>log section</title>
139             <para>Configure logging.</para>
140             <variablelist>
141                 <varlistentry> <!-- LOG -->
142                     <term><option>[log]</option></term>
143                     <listitem><para></para></listitem>
144                 </varlistentry>
145                 <varlistentry> <!-- log.logfile -->
146                     <term><option>logfile=</option></term>
147                     <listitem>
148                         <para>File to log to, usually in dæmon mode.<sbr />Default
149                             (empty or unset) is to log to stdin/stdout.</para>
150                     </listitem>
151                 </varlistentry>
152                 <varlistentry> <!-- log.verbosity -->
153                     <term><option>verbosity=</option><replaceable>info</replaceable></term>
154                     <listitem>
155                         <para>Logging verbosity among
156                             <replaceable>debug</replaceable>,
157                             <replaceable>info</replaceable>,
158                             <replaceable>warning</replaceable>,
159                             <replaceable>error</replaceable>.</para>
160                     </listitem>
161                 </varlistentry>
162             </variablelist>
163         </refsect2>
164         <refsect2 id="daemon">
165             <title>Process daemonization</title>
166             <para>Configure process daemon.</para>
167             <variablelist>
168                 <varlistentry> <!-- DAEMON -->
169                     <term><option>[daemon]</option></term>
170                     <listitem><para></para></listitem>
171                 </varlistentry>
172                 <varlistentry> <!-- daemon.daemon -->
173                     <term><option>daemon=false</option></term>
174                     <listitem>
175                         <para>whether to daemonize process or not.</para>
176                     </listitem>
177                 </varlistentry>
178                 <varlistentry> <!-- daemon.pidfile -->
179                     <term><option>pidfile=</option></term>
180                     <listitem>
181                         <para>Where to store process ID.</para>
182                     </listitem>
183                 </varlistentry>
184             </variablelist>
185         </refsect2>
186         <refsect2 id="sima">
187             <title>sima section</title>
188             <para>Core &dhutils; configuration.</para>
189             <variablelist>
190                 <varlistentry> <!-- SIMA -->
191                     <term><option>[sima]</option></term>
192                     <listitem><para></para></listitem>
193                 </varlistentry>
194                 <variablelist>
195                     <varlistentry> <!-- sima.contrib -->
196                         <term><option>contrib=</option><replaceable></replaceable></term>
197                         <listitem>
198                             <para></para>
199                         </listitem>
200                     </varlistentry>
201                     <varlistentry> <!-- sima.internal -->
202                         <term><option>internal=</option><replaceable>Lastfm, Random, Crop</replaceable></term>
203                         <listitem>
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]".
210                             </para>
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 />
214                             </para>
215                             <para>You can add, combine here as many plugins you want.<sbr />
216                                 The priority may be used to order them.
217                             </para>
218                         </listitem>
219                     </varlistentry>
220                     <varlistentry> <!-- sima.history_duration -->
221                         <term><option>history_duration=</option><replaceable>8</replaceable></term>
222                         <listitem>
223                             <para>How far to look back in history to avoid to play
224                                 twice the same track/title (duration in
225                                 hours).<sbr />
226                                 The <option>history_duration</option> is also used to give priority to not recently played artists.
227                             </para>
228                         </listitem>
229                     </varlistentry>
230                     <varlistentry> <!-- sima.queue_length -->
231                         <term><option>queue_length=</option><replaceable>2</replaceable></term>
232                         <listitem>
233                             <para>Threshold value triggering queue process.</para>
234                         </listitem>
235                     </varlistentry>
236                     <varlistentry> <!-- sima.musicbrainzid -->
237                         <term><option>musicbrainzid=</option><replaceable>true</replaceable></term>
238                         <listitem>
239                             <para>Use MusicBrainzIdentifier to search music (mainly
240                                 for artists).
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/"/>.
246                             </para>
247                         </listitem>
248                     </varlistentry>
249                     <varlistentry> <!-- sima.repeat_disable_queue -->
250                         <term><option>repeat_disable_queue=</option><replaceable>true</replaceable></term>
251                         <listitem>
252                             <para>Prevent disabling queuing in repeat play mode.
253                             </para>
254                         </listitem>
255                     </varlistentry>
256                     <varlistentry> <!-- sima.single_disable_queue -->
257                         <term><option>single_disable_queue=</option><replaceable>true</replaceable></term>
258                         <listitem>
259                             <para>Prevent disabling queuing in single play mode.
260                             </para>
261                         </listitem>
262                     </varlistentry>
263                 </variablelist>
264             </variablelist>
265         </refsect2>
266         <refsect2 id="crop">
267             <title>Crop section</title>
268             <para>crop plugin's configuration:</para>
269                 <varlistentry> <!-- crop -->
270                     <term><option>[crop]</option></term>
271                 </varlistentry>
272                 <varlistentry> <!-- crop.consume -->
273                     <term><option>consume=</option><replaceable>10</replaceable></term>
274                     <listitem>
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.
278                         </para>
279                     </listitem>
280                 </varlistentry>
281                 <varlistentry> <!-- crop.priority -->
282                     <term><option>priority=</option><replaceable>10</replaceable></term>
283                     <listitem>
284                         <para>
285                             Plugin priority
286                         </para>
287                     </listitem>
288                 </varlistentry>
289         </refsect2>
290         <refsect2 id="random">
291             <title>Random section</title>
292             <para>Random plugin's configuration:</para>
293                 <varlistentry> <!-- random -->
294                     <term><option>[random]</option></term>
295                 </varlistentry>
296                 <varlistentry> <!-- random.flavour -->
297                     <term><option>flavour=</option><replaceable>sensible</replaceable></term>
298                     <listitem>
299                         <para>When no similar tracks are found, falling back to
300                             random queuing. Different mode, aka random flavour,
301                             are available:
302                             <replaceable>pure</replaceable>,
303                             <replaceable>sensible</replaceable>,
304                             <replaceable>genre</replaceable>.
305                             <itemizedlist mark='bullet'>
306                                 <listitem>
307                                     <para><replaceable>pure</replaceable>, pure random choice, even among recently played track.
308                                     </para>
309                                 </listitem>
310                                 <listitem >
311                                     <para><replaceable>sensible</replaceable>, use play history to filter chosen tracks.
312                                     </para>
313                                 </listitem>
314                                 <listitem>
315                                     <para><replaceable>genre</replaceable>, Not implemented yet.
316                                     </para>
317                                 </listitem>
318                             </itemizedlist>
319                         </para>
320                     </listitem>
321                 </varlistentry>
322                 <varlistentry> <!-- random.priority -->
323                     <term><option>priority=</option><replaceable>50</replaceable></term>
324                     <listitem>
325                         <para>
326                             Plugin priority
327                         </para>
328                     </listitem>
329                 </varlistentry>
330         </refsect2>
331         <refsect2 id="lastfm">
332             <title>LastFm section</title>
333             <para>LastFM plugin's configuration.</para>
334             <variablelist>
335                 <varlistentry> <!-- lastfm -->
336                     <term><option>[lastfm]</option></term>
337                 </varlistentry>
338                 <varlistentry> <!-- lastfm.queue_mode -->
339                     <term><option>queue_mode=</option><replaceable>track</replaceable></term>
340                     <listitem>
341                         <para>Queue mode to use among
342                             <replaceable>track</replaceable>,
343                             <replaceable>top</replaceable> and
344                             <replaceable>album</replaceable> (see <xref linkend="queue_mode"/> for info about queue modes).</para>
345                     </listitem>
346                 </varlistentry>
347                 <varlistentry> <!-- lastfm.max_art -->
348                     <term><option>max_art=</option><replaceable>10</replaceable></term>
349                     <listitem>
350                         <para>Maximum number of similar artist to retrieve from local
351                             media library.<sbr />When set to something superior
352                             to zero, it tries to get as much similar artists
353                             from media library.</para>
354                     </listitem>
355                 </varlistentry>
356                 <varlistentry> <!-- lastfm.depth -->
357                     <term><option>depth=</option><replaceable>1</replaceable></term>
358                     <listitem>
359                         <para>How many artists to base on similar artists
360                             search.<sbr /> The first is the last played artist
361                             and so on back in the history. Highter depth
362                             generates wider suggestions, it might help to
363                             reduce looping over same artists.
364                             </para>
365                     </listitem>
366                 </varlistentry>
367                 <varlistentry> <!-- lastfm.single_album -->
368                     <term><option>single_album=</option><replaceable>false</replaceable></term>
369                     <listitem>
370                         <para>Prevent from queueing a track from the same album
371                             (it often happens with OST).<sbr />
372                             Only relevant in "track" queue mode.</para>
373                     </listitem>
374                 </varlistentry>
375                 <varlistentry> <!-- lastfm.track_to_add -->
376                     <term><option>track_to_add=</option><replaceable>1</replaceable></term>
377                     <listitem>
378                         <para>How many track(s) to add. Only relevant in
379                             <option>top</option> and <option>track</option>
380                             queue modes. This is actually an upper limit,
381                             min(<option>max_art</option>,
382                             <option>track_to_add</option>) will be used.</para>
383                     </listitem>
384                 </varlistentry>
385                 <varlistentry> <!-- lastfm.album_to_add -->
386                     <term><option>album_to_add=</option><replaceable>1</replaceable></term>
387                     <listitem>
388                         <para>How many album(s) to add. Only relevant in
389                             <option>album</option> queue modes.</para>
390                     </listitem>
391                 </varlistentry>
392                 <varlistentry> <!-- lastfm.track_to_add_from_album -->
393                     <term><option>track_to_add_from_album=</option><replaceable>0</replaceable></term>
394                     <listitem>
395                         <para>How many track(s) to add from each selected albums. Only relevant in
396                           <option>album</option> queue modes. When set to 0 or lower the whole album is queued.
397                           </para>
398                     </listitem>
399                 </varlistentry>
400                 <varlistentry> <!-- lastfm.cache -->
401                     <term><option>cache=</option><replaceable>True</replaceable></term>
402                     <listitem>
403                         <para>Whether or not to use on-disk persistent http
404                             cache.<sbr />When set to "true", sima will use a
405                             persistent cache for its http client. The cache is
406                             written along with the dbfile in:<sbr />
407                             <filename>$XDG_CONFIG_HOME/mpd_sima/http/WEB_SERVICE</filename>.<sbr/>
408                             If set to "false", caching is still done but in memory.
409                         </para>
410                     </listitem>
411                 </varlistentry>
412                 <varlistentry> <!-- lastfm.priority -->
413                     <term><option>priority=</option><replaceable>100</replaceable></term>
414                     <listitem>
415                         <para>
416                             Plugin priority
417                         </para>
418                     </listitem>
419                 </varlistentry>
420             </variablelist>
421         </refsect2>
422         <refsect2 id="tags">
423             <title>Tags section</title>
424               <para>Tags plugin's configuration. There is no default configuration for this plugin, it does not work out of the box.</para>
425               <para>
426                 This plugin permits offline autoqueuing based on files tags only. Supported tags are
427               <option>'comment'</option>, <option>'date'</option>, <option>'genre'</option>, <option>'label'</option> and
428               <option>'originaldate'</option>. It currently supports single track queuing only, no album mode for this plugin.
429               </para>
430             <para>
431               In addition to supported tags above you can use an MPD filter. Please refer to MPD protocol documentation for more.
432             </para>
433             <para>
434               All entries in this section are ANDed as a single MPD filter to look for titles
435               in the library. Moreover, with tags, comma separated values are also ANDed.<sbr />
436               For instance setting "<option>genre=rock</option>" and
437               "<option>date=1982,1983,1984,1985,1986,1987,1988,1989</option>"
438               will end up looking for track tagged with genre <option>rock</option>
439               and date within 1985 through 1990.<sbr />
440               Using an MPD filter to replace <option>date</option> you can achieve
441               the same with the following setting: "<option>genre=rock</option>" and
442               "<option>filter=(date =~ '198[2-9]')</option>" (provided your MPD server
443               was compiled with libpcre).
444             </para>
445                 <varlistentry> <!-- tags -->
446                    <term><option>[tags]</option></term>
447                 </varlistentry>
448                 <varlistentry> <!-- tags.filter -->
449                     <term><option>filter=</option></term>
450                     <listitem>
451                         <para>You can use here any valid MPD filter as defined in MPD protocol documentation.</para>
452                     </listitem>
453                 </varlistentry>
454                 <varlistentry> <!-- tags.comment -->
455                     <term><option>comment=</option></term>
456                 </varlistentry>
457                 <varlistentry> <!-- tags.date -->
458                     <term><option>date=</option></term>
459                 </varlistentry>
460                 <varlistentry> <!-- tags.genre -->
461                     <term><option>genre=</option></term>
462                 </varlistentry>
463                 <varlistentry> <!-- tags.label -->
464                     <term><option>label=</option></term>
465                 </varlistentry>
466                 <varlistentry> <!-- tags.priority -->
467                     <term><option>priority=</option><replaceable>80</replaceable></term>
468                     <listitem>
469                         <para>
470                             Plugin priority
471                         </para>
472                     </listitem>
473                 </varlistentry>
474         </refsect2>
475     </refsect1>
476     <refsect1 id="queue_mode">
477         <title>QUEUE MODES</title>
478         <para>&dhpackage; offers different queue modes with lastfm plugin. All of them pick up
479             tracks from artists similar to the last track in the queue.</para>
480         <para>&dhpackage; tries preferably to chose among unplayed artists or
481             at least not recently played artist. Concerning track and album
482             queue modes titles are chosen purely at random among unplayed
483             tracks.</para>
484         <variablelist>
485             <varlistentry>
486                 <term><option>track</option></term>
487                 <listitem>
488                     <para>Queue a similar track chosen at random from a similar artist.</para>
489                 </listitem>
490             </varlistentry>
491             <varlistentry>
492                 <term><option>top</option></term>
493                 <listitem>
494                     <para>Queue a track from a similar artist, chosen among
495                         "top tracks" according to last.fm data mining.</para>
496                 </listitem>
497             </varlistentry>
498             <varlistentry>
499                 <term><option>album</option></term>
500                 <listitem>
501                     <para>Queue a whole album chosen at random from a similar artist.</para>
502                     <para><emphasis>Nota Bene:</emphasis><sbr /> Due to the
503                         track point of view of database build upon tracks tags
504                         an album lookup for a specific artist will return
505                         albums as soon as this artist appears in a single track
506                         of the album.<sbr />
507                         For instance looking for album from "The Velvet
508                         Underground" will fetch "Last Days" and "Juno" OSTs
509                         because the band appears on the soundtrack of these two
510                         movies.<sbr />
511                         A solution is for you to set AlbumArtists tag to
512                         something different than the actual artist of the
513                         track. For compilations, OSTs etc. a strong convention
514                         is to use "Various Artists" for this tag.</para>
515                     <para>&dhpackage; is currently looking for AlbumArtists tags
516                         and avoid album where this tag is set with "Various
517                         Artists". If a single track within an album is found
518                         with AlbumArtists:"Various Artists" the complete album
519                         is skipped and won't be queued.</para>
520                 </listitem>
521             </varlistentry>
522         </variablelist>
523     </refsect1>
524   <xi:include href="files.xml" />
525   <xi:include href="feedback.xml" />
526   <xi:include href="seealso.xml" />
527 </refentry>
528 <!-- vim: tabstop=4 softtabstop=4 shiftwidth=4 :
529 -->