]> kaliko git repositories - mpd-sima.git/blob - data/man/mpd_sima.cfg.5
4816acd4169fe710aed44123d6aa6f949ad6e921
[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.2 <http://docbook.sf.net/>
5 .\"      Date: 11/16/2021
6 .\"    Manual: mpd-sima 0.18.0 User Manual
7 .\"    Source: mpd-sima
8 .\"  Language: English
9 .\"
10 .TH "MPD_SIMA\&.CFG" "5" "11/16/2021" "mpd-sima" "mpd-sima 0.18.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 When no similar tracks are found, falling back to random queuing\&.
274 .PP
275 Random plugin\*(Aqs configuration:
276 .PP
277 \fB[random]\fR
278 .RS 4
279 .RE
280 .PP
281 \fBtrack_to_add=\fR\fI1\fR
282 .RS 4
283 How many track(s) to add\&.
284 .RE
285 .PP
286 \fBflavour=\fR\fIsensible\fR
287 .RS 4
288 Different mode, aka random flavour, are available:
289 \fIpure\fR,
290 \fIsensible\fR,
291 .sp
292 .RS 4
293 .ie n \{\
294 \h'-04'\(bu\h'+03'\c
295 .\}
296 .el \{\
297 .sp -1
298 .IP \(bu 2.3
299 .\}
300 \fIpure\fR, pure random choice, even among recently played track\&.
301 .RE
302 .sp
303 .RS 4
304 .ie n \{\
305 \h'-04'\(bu\h'+03'\c
306 .\}
307 .el \{\
308 .sp -1
309 .IP \(bu 2.3
310 .\}
311 \fIsensible\fR, use play history to filter chosen tracks\&.
312 .RE
313 .sp
314 .RE
315 .PP
316 \fBpriority=\fR\fI50\fR
317 .RS 4
318 Plugin priority
319 .RE
320 .SS "LastFm section"
321 .PP
322 LastFM plugin\*(Aqs configuration\&.
323 .PP
324 \fB[lastfm]\fR
325 .RS 4
326 .RE
327 .PP
328 \fBqueue_mode=\fR\fItrack\fR
329 .RS 4
330 Queue mode to use among
331 \fItrack\fR,
332 \fItop\fR
333 and
334 \fIalbum\fR
335 (see
336 the section called \(lqQUEUE MODES\(rq
337 for info about queue modes)\&.
338 .RE
339 .PP
340 \fBmax_art=\fR\fI10\fR
341 .RS 4
342 Maximum number of similar artist to retrieve from local media library\&.
343 .br
344 When set to something superior to zero, it tries to get as much similar artists from media library\&.
345 .RE
346 .PP
347 \fBdepth=\fR\fI1\fR
348 .RS 4
349 How many artists to base on similar artists search\&.
350 .br
351
352 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\&.
353 .RE
354 .PP
355 \fBsingle_album=\fR\fIfalse\fR
356 .RS 4
357 Prevent from queueing a track from the same album (it often happens with OST)\&.
358 .br
359
360 Only relevant in "track" queue mode\&.
361 .RE
362 .PP
363 \fBtrack_to_add=\fR\fI1\fR
364 .RS 4
365 How many track(s) to add\&. Only relevant in
366 \fBtop\fR
367 and
368 \fBtrack\fR
369 queue modes\&. This is actually an upper limit, min(\fBmax_art\fR,
370 \fBtrack_to_add\fR) will be used\&.
371 .RE
372 .PP
373 \fBalbum_to_add=\fR\fI1\fR
374 .RS 4
375 How many album(s) to add\&. Only relevant in
376 \fBalbum\fR
377 queue modes\&.
378 .RE
379 .PP
380 \fBtrack_to_add_from_album=\fR\fI0\fR
381 .RS 4
382 How many track(s) to add from each selected albums\&. Only relevant in
383 \fBalbum\fR
384 queue modes\&. When set to 0 or lower the whole album is queued\&.
385 .RE
386 .PP
387 \fBcache=\fR\fITrue\fR
388 .RS 4
389 Whether or not to use on\-disk persistent http cache\&.
390 .br
391 When set to "true", sima will use a persistent cache for its http client\&. The cache is written along with the dbfile in:
392 .br
393
394 $XDG_DATA_HOME/mpd_sima/http/WEB_SERVICE\&.
395 .br
396
397 If set to "false", caching is still done but in memory\&.
398 .RE
399 .PP
400 \fBpriority=\fR\fI100\fR
401 .RS 4
402 Plugin priority
403 .RE
404 .SS "Genre section"
405 .PP
406 Genre plugin\*(Aqs configuration\&.
407 .PP
408 This plugin permits offline autoqueuing based on files genre tag only\&.
409 .PP
410 it will try to queue tracks base on genre tags of tracks in the queue\&.
411 .PP
412 \fB[genre]\fR
413 .RS 4
414 .RE
415 .PP
416 \fBqueue_mode=\fR\fItrack\fR
417 .RS 4
418 Queue mode to use among
419 \fItrack\fR,
420 \fIalbum\fR
421 (see
422 the section called \(lqQUEUE MODES\(rq
423 for info about queue modes)\&.
424 .RE
425 .PP
426 \fBsingle_album=\fR\fIfalse\fR
427 .RS 4
428 Prevent from queueing a track from the same album (it often happens with OST)\&.
429 .br
430
431 Only relevant in "track" queue mode\&.
432 .RE
433 .PP
434 \fBpriority=\fR\fI80\fR
435 .RS 4
436 Plugin priority
437 .RE
438 .PP
439 \fBtrack_to_add=\fR\fI1\fR
440 .RS 4
441 How many track(s) to add\&.
442 .RE
443 .PP
444 \fBalbum_to_add=\fR\fI1\fR
445 .RS 4
446 How many album(s) to add\&. Only relevant in
447 \fBalbum\fR
448 queue mode\&.
449 .RE
450 .SS "Tags section"
451 .PP
452 Tags plugin\*(Aqs configuration\&. There is no default configuration for this plugin, it does not work out of the box\&.
453 .PP
454 This plugin permits offline autoqueuing based on files tags only\&. Supported tags are
455 \fB\*(Aqcomment\*(Aq\fR,
456 \fB\*(Aqdate\*(Aq\fR,
457 \fB\*(Aqgenre\*(Aq\fR,
458 \fB\*(Aqlabel\*(Aq\fR
459 and
460 \fB\*(Aqoriginaldate\*(Aq\fR\&.
461 .PP
462 In addition to supported tags above you can use an MPD filter\&. Please refer to MPD protocol documentation for more\&.
463 .PP
464 All tag entries in this section are ANDed as a single MPD filter to look for titles in the library\&. Moreover, for each tags, comma separated values are also ORed\&.
465 .br
466
467 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
468 \fBrock\fR
469 and date within 1982 through 1989\&.
470 .br
471
472 Using an MPD filter to replace
473 \fBdate\fR
474 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)\&.
475 .PP
476 \fB[tags]\fR
477 .RS 4
478 .RE
479 .PP
480 \fBqueue_mode=\fR\fItrack\fR
481 .RS 4
482 Queue mode to use among
483 \fItrack\fR,
484 \fIalbum\fR
485 (see
486 the section called \(lqQUEUE MODES\(rq
487 for info about queue modes)\&.
488 .RE
489 .PP
490 \fBsingle_album=\fR\fIfalse\fR
491 .RS 4
492 Prevent from queueing a track from the same album (it often happens with OST)\&.
493 .br
494
495 Only relevant in "track" queue mode\&.
496 .RE
497 .PP
498 \fBfilter=\fR
499 .RS 4
500 You can use here any valid MPD filter as defined in MPD protocol documentation\&.
501 .RE
502 .PP
503 \fBcomment=\fR
504 .RS 4
505 .RE
506 .PP
507 \fBdate=\fR
508 .RS 4
509 .RE
510 .PP
511 \fBgenre=\fR
512 .RS 4
513 .RE
514 .PP
515 \fBlabel=\fR
516 .RS 4
517 .RE
518 .PP
519 \fBoriginaldate=\fR
520 .RS 4
521 .RE
522 .PP
523 \fBpriority=\fR\fI80\fR
524 .RS 4
525 Plugin priority
526 .RE
527 .PP
528 \fBtrack_to_add=\fR\fI1\fR
529 .RS 4
530 How many track(s) to add\&.
531 .RE
532 .PP
533 \fBalbum_to_add=\fR\fI1\fR
534 .RS 4
535 How many album(s) to add\&. Only relevant in
536 \fBalbum\fR
537 queue mode\&.
538 .RE
539 .SH "QUEUE MODES"
540 .PP
541 Different queue modes are available with some plugins (check for
542 \fBqueue_mode\fR
543 presence in plugin config)\&.
544 .PP
545 mpd\-sima tries preferably to chose among unplayed artists or at least not recently played artist\&.
546 .PP
547 \fBtrack\fR
548 .RS 4
549 Queue a similar track chosen at random from a similar artist\&.
550 .RE
551 .PP
552 \fBtop\fR
553 .RS 4
554 Queue a track from a similar artist, chosen among "top tracks" according to last\&.fm data mining\&.
555 .RE
556 .PP
557 \fBalbum\fR
558 .RS 4
559 Queue a whole album chosen at random from a similar artist\&.
560 .sp
561 \fINota Bene:\fR
562 .br
563
564 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\&.
565 .br
566
567 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\&.
568 .br
569
570 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\&.
571 .sp
572 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\&.
573 .RE
574 .SH "FILES"
575 .PP
576 ${XDG_CONFIG_HOME}/mpd_sima/mpd_sima\&.cfg
577 .RS 4
578 Configuration file\&.
579 .RE
580 .PP
581 ${XDG_DATA_HOME}/mpd_sima/sima\&.db
582 .RS 4
583 SQLite DB file\&.
584 .RE
585 .PP
586 ${XDG_DATA_HOME}/mpd_sima/WEB_SERVICE/
587 .RS 4
588 Persistent http cache\&.
589 .RE
590 .PP
591 Usually
592 \fBXDG_DATA_HOME\fR
593 is set to
594 ${HOME}/\&.local/share
595 and
596 \fBXDG_CONFIG_HOME\fR
597 to
598 ${HOME}/\&.config\&.
599 .br
600 You may override them using command line option
601 \fB\-\-var\-dir\fR
602 and
603 \fB\-\-config\fR
604 (cf\&.
605 \fBmpd-sima\fR(1))
606 .SH "FEEDBACK/BUGS"
607 .PP
608 The maintainer would be more than happy to ear from you, don\*(Aqt hesitate to send feedback,
609 \m[blue]\fB\%https://kaliko.me/contact/\fR\m[]\&.
610 .PP
611 XMPP
612 users are welcome to join the dedicated chat room at
613 \m[blue]\fBkaliko\&.me@conf\&.azylum\&.org\fR\m[]\&.
614 .SH "SEE ALSO"
615 .PP
616 \fBmpc\fR(1),
617 \fBmpd\fR(1)
618 .PP
619 /usr/share/doc/mpd\-sima/
620 .SH "AUTHOR"
621 .PP
622 \fBkaliko\fR <\&kaliko@azylum\&.org\&>
623 .RS 4
624 Wrote this man page and is currently leading MPD_sima project\&.
625 .RE
626 .SH "COPYRIGHT"
627 .br
628 Copyright \(co 2009-2021 kaliko
629 .br
630 .PP
631 This manual page was written for the Debian system (and may be used by others)\&.
632 .PP
633 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\&.
634 .PP
635 On Debian systems, the complete text of the GNU General Public License can be found in
636 /usr/share/common\-licenses/GPL\&.
637 .sp