]> kaliko git repositories - mpd-sima.git/blob - doc/source/man/mpd_sima.cfg.5.rst
doc: Add missig daemon section in all_settings.cfg
[mpd-sima.git] / doc / source / man / mpd_sima.cfg.5.rst
1 ============
2 mpd_sima.cfg
3 ============
4
5 DESCRIPTION
6 -----------
7
8 This manual page documents briefly ``mpd-sima`` configuration options available
9 in user configuration file (see `FILES <#files>`__).
10
11 EXAMPLES
12 --------
13
14 File tags queue mode (offline mode).
15 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16
17 Here is an example of autoqueue using file tags only.
18
19 ::
20
21     [MPD]
22     # Uses defaults for MPD connection
23     #host = localhost
24     #port = 6600
25     #password = s3cr3t
26
27     [sima] # Setup internal plugins
28     # Tags plugin falls back to Random if nothing is found then Crop the queue
29     internal = Tags, Random, Crop
30     history_duration = 48  # 48h / 24 = 2 days
31     queue_length = 2       # triggers autoqueue when 2 tracks remains to play
32
33     [tags]
34     # Look for files with tagged with genre "electronica" OR "IDM" OR "glitch"
35     genre = electronica, IDM, glitch
36
37     [crop]
38     # keep 30 played tracks in playlist
39     consume = 30
40
41
42 Album queue mode using last.fm recommendations (online mode).
43 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44
45 Here is an example of album queue configuration using online
46 recommendations system.
47
48 ::
49
50     [sima]
51     history_duration = 96  # 4 days in hours, get a larger history for album mode
52     queue_length = 5
53
54     [crop]
55     consume = 20
56
57     [lastfm]
58     queue_mode = album
59     album_to_add = 1
60
61 .. _options:
62
63 Configuration file
64 ------------------
65
66 The configuration file consists of sections, led by a ``[section]``
67 header and followed by ``name: value`` entries, with continuations in
68 the style of :rfc:`822` (see section 3.1.1, “LONG HEADER FIELDS”);
69 ``name=value`` is also accepted. Lines beginning with ``'#'`` or ``';'``
70 are ignored and may be used to provide comments (*Nota Bene:* inline
71 comment are possible using ``'#'``).
72
73 The default values are used in the options lists below.
74
75 .. _MPD:
76
77 MPD section
78 ^^^^^^^^^^^
79
80 This section is meant to configure MPD access, MPD host address / port
81 and password if necessary.
82
83 **[MPD]**
84
85 **host=localhost**
86     Set MPD host. Use IP or FQDN.
87
88 **port=6600**
89     Set host port to access MPD to.
90
91 **password=s3cr3t**
92     Set MPD password to use. Do not use this option if you don't have
93     enabled password protected access on your MPD server.
94
95 .. _log:
96
97 log section
98 ^^^^^^^^^^^
99
100 Configure logging.
101
102 **[log]**
103
104 **logfile=**
105     File to log to, usually in dæmon mode.Default (empty or unset) is to
106     log to stdin/stdout.
107
108 **verbosity=info**
109     Logging verbosity among debug, info, warning, error.
110
111 .. _daemon:
112
113 Process daemonization
114 ^^^^^^^^^^^^^^^^^^^^^
115
116 Configure process daemon.
117
118 **[daemon]**
119
120 **daemon=false**
121     Whether to daemonize process or not.
122
123 **pidfile=**
124     Where to store process ID.
125
126 .. _sima:
127
128 sima section
129 ^^^^^^^^^^^^
130
131 Core mpd-sima configuration.
132
133 **[sima]**
134
135
136 **internal=Lastfm, Random, Crop**
137     mpd-sima's plugin management for internal source plugin and contrib (ie. external plugins).
138
139     Plugins list is a comma separated string list.
140
141     Optional plugin's configuration lays in its own section.
142     For instance a "AwesomePlugin" declared here gets its configuration from the corresponding section "[awesomeplugin]".
143
144     The default list of plugins to load at startup: Lastfm,Random,Crop.
145
146     Crop is an utility plugin, it does not queue any tracks (cf. below).
147
148     Random will queue a track at random if other plugins did not return any tracks.
149
150     You can add, combine here as many plugins you want.
151
152     The priority may be used to order them.
153
154 **history_duration=8**
155     How far to look back in history to avoid to play twice the same track/title (duration in hours).
156
157     The history_duration is also used to give priority to not recently played artists. Artist/tracks not in the scope of history have higther priority.
158
159 **queue_length=2**
160     Threshold value triggering queue process.
161
162 **musicbrainzid=true**
163     Use MusicBrainzIdentifier to search music (mainly for artists). Default is True, switch to False if you don't have MusicBrainzIdentifier set for at least 80% of you music library.
164
165     Consider using these metadata as it enhances a lot artist/album/tracks identification. Use Picard to tag your file: https://picard.musicbrainz.org/.
166
167 **repeat_disable_queue=true**
168     Prevent disabling queuing in repeat play mode.
169
170 **single_disable_queue=true**
171     Prevent disabling queuing in single play mod
172
173
174 .. _crop:
175
176 Crop section
177 ^^^^^^^^^^^^
178
179 crop plugin's configuration:
180
181 **[crop]**
182
183 **consume=10**
184     How many played tracks to keep in the queue. Allows you to maintain a
185     fixed length queue. Set to some negative integer to keep all played
186     tracks.
187
188 **priority=10**
189     Plugin priority
190
191 .. _random:
192
193 Random section
194 ^^^^^^^^^^^^^^
195
196 When no similar tracks are found, falling back to random queuing.
197
198 Random plugin's configuration:
199
200 **[random]**
201
202 **track_to_add=1**
203     How many track(s) to add.
204
205 **flavour=sensible**
206     Different mode, aka random flavour, are available: **pure**, **sensible**,
207
208       -  **pure**: pure random choice, even among recently played track.
209
210       -  **sensible**: use play history to filter chosen tracks.
211
212 **priority=50**
213     Plugin priority
214
215 .. _lastfm:
216
217 LastFm section
218 ^^^^^^^^^^^^^^
219
220 LastFM plugin's configuration.
221
222
223 **[lastfm]**
224
225 **queue_mode=track**
226
227     Queue mode to use among track, top and album (see `QUEUE MODE section
228     <#queue_mode>`__ for info about queue modes).
229
230 **max_art=20**
231
232     Maximum number of similar artist to retrieve from local media
233     library. When set to something superior to zero, it tries to get as
234     much similar artists from media library.
235
236 **depth=1**
237     How many artists to base on similar artists search. The first is the
238     last played artist and so on back in the history. Highter depth
239     generates wider suggestions, it might help to reduce looping over
240     same artists.
241
242 **single_album=false**
243     Prevent from queueing a track from the same album (it often happens
244     with OST). Only relevant in "track" queue mode.
245
246 **track_to_add=1**
247     How many track(s) to add. Only relevant in ``top`` and ``track``
248     queue modes. This is actually an upper limit, min(``max_art``,
249     ``track_to_add``) will be used.
250
251 **album_to_add=1**
252     How many album(s) to add. Only relevant in ``album`` queue modes.
253
254 **track_to_add_from_album=0**
255     How many track(s) to add from each selected albums. Only relevant in
256     ``album`` queue modes. When set to 0 or lower the whole album is
257     queued.
258
259 **cache=True**
260     Whether or not to use on-disk persistent http cache.When set to
261     "true", sima will use a persistent cache for its http client. The
262     cache is written along with the dbfile in:
263     ``$XDG_DATA_HOME/mpd_sima/http/WEB_SERVICE``. If set to "false",
264     caching is still done but in memory.
265
266 **priority=100**
267     Plugin priority
268
269 .. _genre:
270
271 Genre section
272 ^^^^^^^^^^^^^
273
274 Genre plugin's configuration.
275
276 This plugin permits offline autoqueuing based on files genre tag only.
277
278 It will try to queue tracks with similar genres (track's genre being read from
279 tags).
280
281
282 **[genre]**
283
284 **queue_mode=track**
285     Queue mode to use among track, album (see
286     `QUEUE MODE section <#queue_mode>`__ for more info).
287
288 **single_album=false**
289     Prevent from queueing a track from the same album (it often happens with
290     OST). Only relevant in "track" queue mode.
291
292 **priority=80**
293     Plugin priority
294
295 **track_to_add=1**
296     How many track(s) to add.
297
298 **album_to_add=1**
299     How many album(s) to add. Only relevant in ``album`` queue mode.
300
301 .. _tags:
302
303 Tags section
304 ^^^^^^^^^^^^
305
306 Tags plugin's configuration. There is no default configuration for this
307 plugin, it does not work out of the box.
308
309 This plugin permits offline autoqueuing based on files tags only.
310 Supported tags are ``'comment'``, ``'date'``, ``'genre'``, ``'label'``
311 and ``'originaldate'``.
312
313 In addition to supported tags above you can use an MPD filter. Please
314 refer to MPD protocol documentation for more.
315
316 All tag entries in this section are ANDed as a single MPD filter to look
317 for titles in the library. Moreover, for each tags, comma separated
318 values are also ORed. For instance setting "``genre=rock``" and
319 "``date=1982,1983,1984,1985,1986,1987,1988,1989``" will end up looking
320 for track tagged with genre ``rock`` and date within 1982 through 1989.
321 Using an MPD filter to replace ``date`` you can achieve the same with
322 the following setting: "``genre=rock``" and
323 "``filter=(date =~ '198[2-9]+')``" (provided your MPD server was
324 compiled with libpcre).
325
326 **[tags]**
327
328 **queue_mode=track**
329     Queue mode to use among track, album (see `QUEUE MODES section
330     <#queue_mode>`__ for info).
331
332 **single_album=false**
333     Prevent from queueing a track from the same album (it often happens with
334     OST). Only relevant in "track" queue mode.
335
336 **filter=**
337     You can use here any valid MPD filter as defined in MPD protocol
338     documentation.
339
340 **comment=**
341
342 **date=**
343
344 **genre=**
345
346 **label=**
347
348 **originaldate=**
349
350 **priority=80**
351     Plugin priority
352
353 **track_to_add=1**
354     How many track(s) to add.
355
356 **album_to_add=1**
357    How many album(s) to add. Only relevant in ``album`` queue mode.
358
359 .. _queue_mode:
360
361 QUEUE MODES
362 -----------
363
364 Different queue modes are available with some plugins (check for
365 ``queue_mode`` presence in plugin config).
366
367 mpd-sima tries preferably to chose among unplayed artists or at least
368 not recently played artist.
369
370 ``track``
371     Queue a similar track chosen at random from a similar artist.
372
373 ``top``
374     Queue a track from a similar artist, chosen among "top tracks"
375     according to last.fm data mining.
376
377 ``album``
378     Queue a whole album chosen at random from a similar artist.
379
380     *Nota Bene:* Due to the track point of view of database build upon
381     tracks tags an album lookup for a specific artist will return albums
382     as soon as this artist appears in a single track of the album. For
383     instance looking for album from "The Velvet Underground" will fetch
384     "Last Days" and "Juno" OSTs because the band appears on the
385     soundtrack of these two movies. A solution is for you to set
386     AlbumArtists tag to something different than the actual artist of the
387     track. For compilations, OSTs etc. a strong convention is to use
388     "Various Artists" for this tag.
389
390     mpd-sima is currently looking for AlbumArtists tags and avoid album
391     where this tag is set with "Various Artists". If a single track
392     within an album is found with AlbumArtists:"Various Artists" the
393     complete album is skipped and won't be queued.
394
395 .. include:: files.rst
396 .. include:: seealso.rst
397 .. include:: info.rst