]> kaliko git repositories - mpd-sima.git/blob - data/man/mpd_sima.cfg.5
Releasing 0.16.0
[mpd-sima.git] / data / man / mpd_sima.cfg.5
1 '\" t
2 .\"     Title: mpd_sima.cfg
3 .\"    Author: kaliko <kaliko@azylum.org>
4 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5 .\"      Date: 12/15/2020
6 .\"    Manual: mpd-sima 0.16.0 User Manual
7 .\"    Source: mpd-sima
8 .\"  Language: English
9 .\"
10 .TH "MPD_SIMA\&.CFG" "5" "12/15/2020" "mpd-sima" "mpd-sima 0.16.0 User Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 mpd_sima.cfg \- mpd\-sima will try to maintain some titles ahead in the queue following different policies\&. This manual document the configuration file for mpd\-sima\&.
32 .SH "DESCRIPTION"
33 .PP
34 This manual page documents briefly
35 \fBmpd\-sima\fR
36 configuration options available in user configuration file (see
37 the section called \(lqFILES\(rq)\&.
38 .SH "EXAMPLES"
39 .SS "File tags queue mode (offline mode)\&."
40 .PP
41 Here is an example of autoqueue using file tags only\&.
42 .sp
43 .if n \{\
44 .RS 4
45 .\}
46 .nf
47 [MPD]
48 host=example\&.org
49 port=6601
50
51 [sima]
52 # Setup internal plugins
53 internal = Tags, Crop
54 history_duration=48  # 2 days
55 queue_length=2
56
57 [tags]
58 # Look for files with tagged with genre "electonica" OR "IDM" OR "glitch"
59 genre = electonica, IDM, glitch
60
61 [crop]
62 # keep 30 played tracks in playlist
63 consume=30
64
65             
66 .fi
67 .if n \{\
68 .RE
69 .\}
70 .SS "Album queue mode using last\&.fm recommendations (online mode)\&."
71 .PP
72 Here is an example of album queue configuration using online recommendations system\&.
73 .sp
74 .if n \{\
75 .RS 4
76 .\}
77 .nf
78 [MPD]
79 host=example\&.org
80 port=8000
81
82 [sima]
83 history_duration=48  # 2 days
84 queue_length=5
85
86 [lastfm]
87 queue_mode=album
88 album_to_add=2
89
90 [crop]
91 # keep 30 played tracks in playlist
92 consume=30
93
94             
95 .fi
96 .if n \{\
97 .RE
98 .\}
99 .SH "CONFIGURATION FILE"
100 .PP
101 The configuration file consists of sections, led by a
102 \fB[section]\fR
103 header and followed by
104 \fBname:\ \&value\fR
105 entries, with continuations in the style of RFC 822 (see section 3\&.1\&.1, \(lqLONG HEADER FIELDS\(rq);
106 \fBname=value\fR
107 is also accepted\&. Lines beginning with
108 \fI\*(Aq#\*(Aq\fR
109 or
110 \fI\*(Aq;\*(Aq\fR
111 are ignored and may be used to provide comments (\fINota Bene:\fR
112 inline comment are possible using
113 \fI\*(Aq#\*(Aq\fR)\&.
114 .PP
115 The default values are used in the options lists below\&.
116 .SS "MPD section"
117 .PP
118 This section is meant to configure MPD access, MPD host address / port and password if necessary\&.
119 .PP
120 \fB[MPD]\fR
121 .RS 4
122 .RE
123 .PP
124 \fBhost=\fR\fIlocalhost\fR
125 .RS 4
126 Set MPD host\&. Use IP or FQDN\&.
127 .RE
128 .PP
129 \fBport=\fR\fI6600\fR
130 .RS 4
131 Set host port to access MPD to\&.
132 .RE
133 .PP
134 \fBpassword=\fR\fIs3cr3t\fR
135 .RS 4
136 Set MPD password to use\&. Do not use this option if you don\*(Aqt have enabled password protected access on your MPD server\&.
137 .RE
138 .SS "log section"
139 .PP
140 Configure logging\&.
141 .PP
142 \fB[log]\fR
143 .RS 4
144 .RE
145 .PP
146 \fBlogfile=\fR
147 .RS 4
148 File to log to, usually in d\(aemon mode\&.
149 .br
150 Default (empty or unset) is to log to stdin/stdout\&.
151 .RE
152 .PP
153 \fBverbosity=\fR\fIinfo\fR
154 .RS 4
155 Logging verbosity among
156 \fIdebug\fR,
157 \fIinfo\fR,
158 \fIwarning\fR,
159 \fIerror\fR\&.
160 .RE
161 .SS "Process daemonization"
162 .PP
163 Configure process daemon\&.
164 .PP
165 \fB[daemon]\fR
166 .RS 4
167 .RE
168 .PP
169 \fBdaemon=false\fR
170 .RS 4
171 whether to daemonize process or not\&.
172 .RE
173 .PP
174 \fBpidfile=\fR
175 .RS 4
176 Where to store process ID\&.
177 .RE
178 .SS "sima section"
179 .PP
180 Core mpd_sima\&.cfg configuration\&.
181 .PP
182 \fB[sima]\fR
183 .RS 4
184 .RE
185 .PP
186 \fBcontrib=\fR
187 .RS 4
188 .RE
189 .PP
190 \fBinternal=\fR\fILastfm, Random, Crop\fR
191 .RS 4
192 mpd\-sima\*(Aqs plugin management for internal source plugin and contrib (ie\&. external plugins)\&.
193 .br
194
195 Plugins list is a comma separated string list\&.
196 .br
197
198 Optional plugin\*(Aqs configuration lays in its own section\&.
199 .br
200 For instance a "AwesomePlugin" declared here gets its configuration from the corresponding section "[awesomeplugin]"\&.
201 .sp
202 The default list of plugins to load at startup:
203 \fBLastfm\fR,\fBRandom\fR,\fBCrop\fR\&.
204 .br
205
206 \fBCrop\fR
207 is an utility plugin, it does not queue any tracks (cf\&. below)\&.
208 .br
209
210 \fBRandom\fR
211 will queue a track at random if other plugins did not return any tracks\&.
212 .br
213
214 .sp
215 You can add, combine here as many plugins you want\&.
216 .br
217
218 The priority may be used to order them\&.
219 .RE
220 .PP
221 \fBhistory_duration=\fR\fI8\fR
222 .RS 4
223 How far to look back in history to avoid to play twice the same track/title (duration in hours)\&.
224 .br
225
226 The
227 \fBhistory_duration\fR
228 is also used to give priority to not recently played artists\&.
229 .RE
230 .PP
231 \fBqueue_length=\fR\fI2\fR
232 .RS 4
233 Threshold value triggering queue process\&.
234 .RE
235 .PP
236 \fBmusicbrainzid=\fR\fItrue\fR
237 .RS 4
238 Use MusicBrainzIdentifier to search music (mainly for artists)\&. Default is True, switch to False if you don\*(Aqt have MusicBrainzIdentifier set for at least 80% of you music library\&.
239 .br
240
241 Consider using these metadata as it enhances a lot artist/album/tracks identification\&. Use Picard to tag your file:
242 \m[blue]\fB\%https://picard.musicbrainz.org/\fR\m[]\&.
243 .RE
244 .PP
245 \fBrepeat_disable_queue=\fR\fItrue\fR
246 .RS 4
247 Prevent disabling queuing in repeat play mode\&.
248 .RE
249 .PP
250 \fBsingle_disable_queue=\fR\fItrue\fR
251 .RS 4
252 Prevent disabling queuing in single play mode\&.
253 .RE
254 .SS "Crop section"
255 .PP
256 crop plugin\*(Aqs configuration:
257 .PP
258 \fB[crop]\fR
259 .RS 4
260 .RE
261 .PP
262 \fBconsume=\fR\fI10\fR
263 .RS 4
264 How many played tracks to keep in the queue\&. Allows you to maintain a fixed length queue\&. Set to some negative integer to keep all played tracks\&.
265 .RE
266 .PP
267 \fBpriority=\fR\fI10\fR
268 .RS 4
269 Plugin priority
270 .RE
271 .SS "Random section"
272 .PP
273 Random plugin\*(Aqs configuration:
274 .PP
275 \fB[random]\fR
276 .RS 4
277 .RE
278 .PP
279 \fBtrack_to_add=\fR\fI1\fR
280 .RS 4
281 How many track(s) to add\&.
282 .RE
283 .PP
284 \fBflavour=\fR\fIsensible\fR
285 .RS 4
286 When no similar tracks are found, falling back to random queuing\&. Different mode, aka random flavour, are available:
287 \fIpure\fR,
288 \fIsensible\fR,
289 \fIgenre\fR\&.
290 .sp
291 .RS 4
292 .ie n \{\
293 \h'-04'\(bu\h'+03'\c
294 .\}
295 .el \{\
296 .sp -1
297 .IP \(bu 2.3
298 .\}
299 \fIpure\fR, pure random choice, even among recently played track\&.
300 .RE
301 .sp
302 .RS 4
303 .ie n \{\
304 \h'-04'\(bu\h'+03'\c
305 .\}
306 .el \{\
307 .sp -1
308 .IP \(bu 2.3
309 .\}
310 \fIsensible\fR, use play history to filter chosen tracks\&.
311 .RE
312 .sp
313 .RS 4
314 .ie n \{\
315 \h'-04'\(bu\h'+03'\c
316 .\}
317 .el \{\
318 .sp -1
319 .IP \(bu 2.3
320 .\}
321 \fIgenre\fR, Not implemented yet\&.
322 .RE
323 .sp
324 .RE
325 .PP
326 \fBpriority=\fR\fI50\fR
327 .RS 4
328 Plugin priority
329 .RE
330 .SS "LastFm section"
331 .PP
332 LastFM plugin\*(Aqs configuration\&.
333 .PP
334 \fB[lastfm]\fR
335 .RS 4
336 .RE
337 .PP
338 \fBqueue_mode=\fR\fItrack\fR
339 .RS 4
340 Queue mode to use among
341 \fItrack\fR,
342 \fItop\fR
343 and
344 \fIalbum\fR
345 (see
346 the section called \(lqQUEUE MODES\(rq
347 for info about queue modes)\&.
348 .RE
349 .PP
350 \fBmax_art=\fR\fI10\fR
351 .RS 4
352 Maximum number of similar artist to retrieve from local media library\&.
353 .br
354 When set to something superior to zero, it tries to get as much similar artists from media library\&.
355 .RE
356 .PP
357 \fBdepth=\fR\fI1\fR
358 .RS 4
359 How many artists to base on similar artists search\&.
360 .br
361
362 The first is the last played artist and so on back in the history\&. Highter depth generates wider suggestions, it might help to reduce looping over same artists\&.
363 .RE
364 .PP
365 \fBsingle_album=\fR\fIfalse\fR
366 .RS 4
367 Prevent from queueing a track from the same album (it often happens with OST)\&.
368 .br
369
370 Only relevant in "track" queue mode\&.
371 .RE
372 .PP
373 \fBtrack_to_add=\fR\fI1\fR
374 .RS 4
375 How many track(s) to add\&. Only relevant in
376 \fBtop\fR
377 and
378 \fBtrack\fR
379 queue modes\&. This is actually an upper limit, min(\fBmax_art\fR,
380 \fBtrack_to_add\fR) will be used\&.
381 .RE
382 .PP
383 \fBalbum_to_add=\fR\fI1\fR
384 .RS 4
385 How many album(s) to add\&. Only relevant in
386 \fBalbum\fR
387 queue modes\&.
388 .RE
389 .PP
390 \fBtrack_to_add_from_album=\fR\fI0\fR
391 .RS 4
392 How many track(s) to add from each selected albums\&. Only relevant in
393 \fBalbum\fR
394 queue modes\&. When set to 0 or lower the whole album is queued\&.
395 .RE
396 .PP
397 \fBcache=\fR\fITrue\fR
398 .RS 4
399 Whether or not to use on\-disk persistent http cache\&.
400 .br
401 When set to "true", sima will use a persistent cache for its http client\&. The cache is written along with the dbfile in:
402 .br
403
404 $XDG_CONFIG_HOME/mpd_sima/http/WEB_SERVICE\&.
405 .br
406
407 If set to "false", caching is still done but in memory\&.
408 .RE
409 .PP
410 \fBpriority=\fR\fI100\fR
411 .RS 4
412 Plugin priority
413 .RE
414 .SS "Tags section"
415 .PP
416 Tags plugin\*(Aqs configuration\&. There is no default configuration for this plugin, it does not work out of the box\&.
417 .PP
418 This plugin permits offline autoqueuing based on files tags only\&. Supported tags are
419 \fB\*(Aqcomment\*(Aq\fR,
420 \fB\*(Aqdate\*(Aq\fR,
421 \fB\*(Aqgenre\*(Aq\fR,
422 \fB\*(Aqlabel\*(Aq\fR
423 and
424 \fB\*(Aqoriginaldate\*(Aq\fR\&. It currently supports single track queuing only, no album mode for this plugin\&.
425 .PP
426 In addition to supported tags above you can use an MPD filter\&. Please refer to MPD protocol documentation for more\&.
427 .PP
428 All entries in this section are ANDed as a single MPD filter to look for titles in the library\&. Moreover, with tags, comma separated values are also ANDed\&.
429 .br
430
431 For instance setting "\fBgenre=rock\fR" and "\fBdate=1982,1983,1984,1985,1986,1987,1988,1989\fR" will end up looking for track tagged with genre
432 \fBrock\fR
433 and date within 1985 through 1990\&.
434 .br
435
436 Using an MPD filter to replace
437 \fBdate\fR
438 you can achieve the same with the following setting: "\fBgenre=rock\fR" and "\fBfilter=(date =~ \*(Aq198[2\-9]\*(Aq)\fR" (provided your MPD server was compiled with libpcre)\&.
439 .PP
440 \fB[tags]\fR
441 .RS 4
442 .RE
443 .PP
444 \fBfilter=\fR
445 .RS 4
446 You can use here any valid MPD filter as defined in MPD protocol documentation\&.
447 .RE
448 .PP
449 \fBcomment=\fR
450 .RS 4
451 .RE
452 .PP
453 \fBdate=\fR
454 .RS 4
455 .RE
456 .PP
457 \fBgenre=\fR
458 .RS 4
459 .RE
460 .PP
461 \fBlabel=\fR
462 .RS 4
463 .RE
464 .PP
465 \fBpriority=\fR\fI80\fR
466 .RS 4
467 Plugin priority
468 .RE
469 .PP
470 \fBtrack_to_add=\fR\fI1\fR
471 .RS 4
472 How many track(s) to add\&.
473 .RE
474 .SH "QUEUE MODES"
475 .PP
476 Different queue modes are available with some plugins (check for
477 \fBqueue_mode\fR
478 presence in plugin config)\&.
479 .PP
480 mpd\-sima tries preferably to chose among unplayed artists or at least not recently played artist\&.
481 .PP
482 \fBtrack\fR
483 .RS 4
484 Queue a similar track chosen at random from a similar artist\&.
485 .RE
486 .PP
487 \fBtop\fR
488 .RS 4
489 Queue a track from a similar artist, chosen among "top tracks" according to last\&.fm data mining\&.
490 .RE
491 .PP
492 \fBalbum\fR
493 .RS 4
494 Queue a whole album chosen at random from a similar artist\&.
495 .sp
496 \fINota Bene:\fR
497 .br
498
499 Due to the track point of view of database build upon tracks tags an album lookup for a specific artist will return albums as soon as this artist appears in a single track of the album\&.
500 .br
501
502 For instance looking for album from "The Velvet Underground" will fetch "Last Days" and "Juno" OSTs because the band appears on the soundtrack of these two movies\&.
503 .br
504
505 A solution is for you to set AlbumArtists tag to something different than the actual artist of the track\&. For compilations, OSTs etc\&. a strong convention is to use "Various Artists" for this tag\&.
506 .sp
507 mpd\-sima is currently looking for AlbumArtists tags and avoid album where this tag is set with "Various Artists"\&. If a single track within an album is found with AlbumArtists:"Various Artists" the complete album is skipped and won\*(Aqt be queued\&.
508 .RE
509 .SH "FILES"
510 .PP
511 ${XDG_CONFIG_HOME}/mpd_sima/mpd_sima\&.cfg
512 .RS 4
513 Configuration file\&.
514 .RE
515 .PP
516 ${XDG_DATA_HOME}/mpd_sima/sima\&.db
517 .RS 4
518 SQLite DB file\&.
519 .RE
520 .PP
521 ${XDG_DATA_HOME}/mpd_sima/WEB_SERVICE/
522 .RS 4
523 Persistent http cache\&.
524 .RE
525 .PP
526 Usually
527 \fBXDG_DATA_HOME\fR
528 is set to
529 ${HOME}/\&.local/share
530 and
531 \fBXDG_CONFIG_HOME\fR
532 to
533 ${HOME}/\&.config\&.
534 .br
535 You may override them using command line option
536 \fB\-\-var\-dir\fR
537 and
538 \fB\-\-config\fR
539 (cf\&.
540 \fBmpd-sima\fR(1))
541 .SH "FEEDBACK/BUGS"
542 .PP
543 The maintainer would be more than happy to ear from you, don\*(Aqt hesitate to send feedback,
544 \m[blue]\fB\%https://kaliko.me/contact/\fR\m[]\&.
545 .PP
546 XMPP
547 users are welcome to join the dedicated chat room at
548 \m[blue]\fBkaliko\&.me@conf\&.azylum\&.org\fR\m[]\&.
549 .SH "SEE ALSO"
550 .PP
551 \fBmpc\fR(1),
552 \fBmpd\fR(1)
553 .PP
554 /usr/share/doc/mpd\-sima/
555 .SH "AUTHOR"
556 .PP
557 \fBkaliko\fR <\&kaliko@azylum\&.org\&>
558 .RS 4
559 Wrote this man page and is currently leading MPD_sima project\&.
560 .RE
561 .SH "COPYRIGHT"
562 .br
563 Copyright \(co 2009-2020 kaliko
564 .br
565 .PP
566 This manual page was written for the Debian system (and may be used by others)\&.
567 .PP
568 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 published by the Free Software Foundation\&.
569 .PP
570 On Debian systems, the complete text of the GNU General Public License can be found in
571 /usr/share/common\-licenses/GPL\&.
572 .sp