]> kaliko git repositories - mpd-sima.git/blob - data/man/mpd_sima.cfg.5
5710c3536c8f030e2d16e56f2985693f54d23d5a
[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: 04/19/2021
6 .\"    Manual: mpd-sima 0.17.0 User Manual
7 .\"    Source: mpd-sima
8 .\"  Language: English
9 .\"
10 .TH "MPD_SIMA\&.CFG" "5" "04/19/2021" "mpd-sima" "mpd-sima 0.17.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 "Genre section"
415 .PP
416 Genre plugin\*(Aqs configuration\&.
417 .PP
418 This plugin permits offline autoqueuing based on files genre tag only\&.
419 .PP
420 it will try to queue tracks base on genre tags of tracks in the queue\&.
421 .PP
422 \fB[tags]\fR
423 .RS 4
424 .RE
425 .PP
426 \fBqueue_mode=\fR\fItrack\fR
427 .RS 4
428 Queue mode to use among
429 \fItrack\fR,
430 \fIalbum\fR
431 (see
432 the section called \(lqQUEUE MODES\(rq
433 for info about queue modes)\&.
434 .RE
435 .PP
436 \fBsingle_album=\fR\fIfalse\fR
437 .RS 4
438 Prevent from queueing a track from the same album (it often happens with OST)\&.
439 .br
440
441 Only relevant in "track" queue mode\&.
442 .RE
443 .PP
444 \fBpriority=\fR\fI80\fR
445 .RS 4
446 Plugin priority
447 .RE
448 .PP
449 \fBtrack_to_add=\fR\fI1\fR
450 .RS 4
451 How many track(s) to add\&.
452 .RE
453 .PP
454 \fBalbum_to_add=\fR\fI1\fR
455 .RS 4
456 How many album(s) to add\&. Only relevant in
457 \fBalbum\fR
458 queue mode\&.
459 .RE
460 .SS "Tags section"
461 .PP
462 Tags plugin\*(Aqs configuration\&. There is no default configuration for this plugin, it does not work out of the box\&.
463 .PP
464 This plugin permits offline autoqueuing based on files tags only\&. Supported tags are
465 \fB\*(Aqcomment\*(Aq\fR,
466 \fB\*(Aqdate\*(Aq\fR,
467 \fB\*(Aqgenre\*(Aq\fR,
468 \fB\*(Aqlabel\*(Aq\fR
469 and
470 \fB\*(Aqoriginaldate\*(Aq\fR\&.
471 .PP
472 In addition to supported tags above you can use an MPD filter\&. Please refer to MPD protocol documentation for more\&.
473 .PP
474 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\&.
475 .br
476
477 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
478 \fBrock\fR
479 and date within 1982 through 1989\&.
480 .br
481
482 Using an MPD filter to replace
483 \fBdate\fR
484 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)\&.
485 .PP
486 \fB[tags]\fR
487 .RS 4
488 .RE
489 .PP
490 \fBqueue_mode=\fR\fItrack\fR
491 .RS 4
492 Queue mode to use among
493 \fItrack\fR,
494 \fIalbum\fR
495 (see
496 the section called \(lqQUEUE MODES\(rq
497 for info about queue modes)\&.
498 .RE
499 .PP
500 \fBsingle_album=\fR\fIfalse\fR
501 .RS 4
502 Prevent from queueing a track from the same album (it often happens with OST)\&.
503 .br
504
505 Only relevant in "track" queue mode\&.
506 .RE
507 .PP
508 \fBfilter=\fR
509 .RS 4
510 You can use here any valid MPD filter as defined in MPD protocol documentation\&.
511 .RE
512 .PP
513 \fBcomment=\fR
514 .RS 4
515 .RE
516 .PP
517 \fBdate=\fR
518 .RS 4
519 .RE
520 .PP
521 \fBgenre=\fR
522 .RS 4
523 .RE
524 .PP
525 \fBlabel=\fR
526 .RS 4
527 .RE
528 .PP
529 \fBoriginaldate=\fR
530 .RS 4
531 .RE
532 .PP
533 \fBpriority=\fR\fI80\fR
534 .RS 4
535 Plugin priority
536 .RE
537 .PP
538 \fBtrack_to_add=\fR\fI1\fR
539 .RS 4
540 How many track(s) to add\&.
541 .RE
542 .PP
543 \fBalbum_to_add=\fR\fI1\fR
544 .RS 4
545 How many album(s) to add\&. Only relevant in
546 \fBalbum\fR
547 queue mode\&.
548 .RE
549 .SH "QUEUE MODES"
550 .PP
551 Different queue modes are available with some plugins (check for
552 \fBqueue_mode\fR
553 presence in plugin config)\&.
554 .PP
555 mpd\-sima tries preferably to chose among unplayed artists or at least not recently played artist\&.
556 .PP
557 \fBtrack\fR
558 .RS 4
559 Queue a similar track chosen at random from a similar artist\&.
560 .RE
561 .PP
562 \fBtop\fR
563 .RS 4
564 Queue a track from a similar artist, chosen among "top tracks" according to last\&.fm data mining\&.
565 .RE
566 .PP
567 \fBalbum\fR
568 .RS 4
569 Queue a whole album chosen at random from a similar artist\&.
570 .sp
571 \fINota Bene:\fR
572 .br
573
574 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\&.
575 .br
576
577 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\&.
578 .br
579
580 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\&.
581 .sp
582 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\&.
583 .RE
584 .SH "FILES"
585 .PP
586 ${XDG_CONFIG_HOME}/mpd_sima/mpd_sima\&.cfg
587 .RS 4
588 Configuration file\&.
589 .RE
590 .PP
591 ${XDG_DATA_HOME}/mpd_sima/sima\&.db
592 .RS 4
593 SQLite DB file\&.
594 .RE
595 .PP
596 ${XDG_DATA_HOME}/mpd_sima/WEB_SERVICE/
597 .RS 4
598 Persistent http cache\&.
599 .RE
600 .PP
601 Usually
602 \fBXDG_DATA_HOME\fR
603 is set to
604 ${HOME}/\&.local/share
605 and
606 \fBXDG_CONFIG_HOME\fR
607 to
608 ${HOME}/\&.config\&.
609 .br
610 You may override them using command line option
611 \fB\-\-var\-dir\fR
612 and
613 \fB\-\-config\fR
614 (cf\&.
615 \fBmpd-sima\fR(1))
616 .SH "FEEDBACK/BUGS"
617 .PP
618 The maintainer would be more than happy to ear from you, don\*(Aqt hesitate to send feedback,
619 \m[blue]\fB\%https://kaliko.me/contact/\fR\m[]\&.
620 .PP
621 XMPP
622 users are welcome to join the dedicated chat room at
623 \m[blue]\fBkaliko\&.me@conf\&.azylum\&.org\fR\m[]\&.
624 .SH "SEE ALSO"
625 .PP
626 \fBmpc\fR(1),
627 \fBmpd\fR(1)
628 .PP
629 /usr/share/doc/mpd\-sima/
630 .SH "AUTHOR"
631 .PP
632 \fBkaliko\fR <\&kaliko@azylum\&.org\&>
633 .RS 4
634 Wrote this man page and is currently leading MPD_sima project\&.
635 .RE
636 .SH "COPYRIGHT"
637 .br
638 Copyright \(co 2009-2021 kaliko
639 .br
640 .PP
641 This manual page was written for the Debian system (and may be used by others)\&.
642 .PP
643 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\&.
644 .PP
645 On Debian systems, the complete text of the GNU General Public License can be found in
646 /usr/share/common\-licenses/GPL\&.
647 .sp