]> kaliko git repositories - mpd-sima.git/blob - doc/source/man/mpd_sima.cfg.5.rst
doc: Merge manual in sphinx build
[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 **queue_mode=track**
225
226     Queue mode to use among track, top and album (see `QUEUE MODE section
227     <#queue_mode>`__ for info about queue modes).
228
229 **max_art=0**
230
231     Maximum number of similar artist to retrieve from local media
232     library. When set to something superior to zero, it tries to get as
233     much similar artists from media library.
234
235 **depth=1**
236     How many artists to base on similar artists search. The first is the
237     last played artist and so on back in the history. Highter depth
238     generates wider suggestions, it might help to reduce looping over
239     same artists.
240
241 **single_album=false**
242     Prevent from queueing a track from the same album (it often happens
243     with OST). Only relevant in "track" queue mode.
244
245 **track_to_add=1**
246     How many track(s) to add. Only relevant in ``top`` and ``track``
247     queue modes. This is actually an upper limit, min(``max_art``,
248     ``track_to_add``) will be used.
249
250 **album_to_add=1**
251     How many album(s) to add. Only relevant in ``album`` queue modes.
252
253 **track_to_add_from_album=0**
254     How many track(s) to add from each selected albums. Only relevant in
255     ``album`` queue modes. When set to 0 or lower the whole album is
256     queued.
257
258 **cache=True**
259     Whether or not to use on-disk persistent http cache.When set to
260     "true", sima will use a persistent cache for its http client. The
261     cache is written along with the dbfile in:
262     ``$XDG_DATA_HOME/mpd_sima/http/WEB_SERVICE``. If set to "false",
263     caching is still done but in memory.
264
265 **priority=100**
266     Plugin priority
267
268 .. _genre:
269
270 Genre section
271 ^^^^^^^^^^^^^
272
273 Genre plugin's configuration.
274
275 This plugin permits offline autoqueuing based on files genre tag only.
276
277 It will try to queue tracks with similar genres (track's genre being read from
278 tags).
279
280
281 **[genre]**
282
283 **queue_mode=track**
284     Queue mode to use among track, album (see
285     `QUEUE MODE section <#queue_mode>`__ for more info).
286
287 **single_album=false**
288     Prevent from queueing a track from the same album (it often happens with
289     OST). Only relevant in "track" queue mode.
290
291 **priority=80**
292     Plugin priority
293
294 **track_to_add=1**
295     How many track(s) to add.
296
297 **album_to_add=1**
298     How many album(s) to add. Only relevant in ``album`` queue mode.
299
300 .. _tags:
301
302 Tags section
303 ^^^^^^^^^^^^
304
305 Tags plugin's configuration. There is no default configuration for this
306 plugin, it does not work out of the box.
307
308 This plugin permits offline autoqueuing based on files tags only.
309 Supported tags are ``'comment'``, ``'date'``, ``'genre'``, ``'label'``
310 and ``'originaldate'``.
311
312 In addition to supported tags above you can use an MPD filter. Please
313 refer to MPD protocol documentation for more.
314
315 All tag entries in this section are ANDed as a single MPD filter to look
316 for titles in the library. Moreover, for each tags, comma separated
317 values are also ORed. For instance setting "``genre=rock``" and
318 "``date=1982,1983,1984,1985,1986,1987,1988,1989``" will end up looking
319 for track tagged with genre ``rock`` and date within 1982 through 1989.
320 Using an MPD filter to replace ``date`` you can achieve the same with
321 the following setting: "``genre=rock``" and
322 "``filter=(date =~ '198[2-9]+')``" (provided your MPD server was
323 compiled with libpcre).
324
325 **[tags]**
326
327 **queue_mode=track**
328     Queue mode to use among track, album (see `QUEUE MODES section
329     <#queue_mode>`__ for info).
330
331 **single_album=false**
332     Prevent from queueing a track from the same album (it often happens with
333     OST). Only relevant in "track" queue mode.
334
335 **filter=**
336     You can use here any valid MPD filter as defined in MPD protocol
337     documentation.
338
339 **comment=**
340
341 **date=**
342
343 **genre=**
344
345 **label=**
346
347 **originaldate=**
348
349 **priority=80**
350     Plugin priority
351
352 **track_to_add=1**
353     How many track(s) to add.
354
355 **album_to_add=1**
356    How many album(s) to add. Only relevant in ``album`` queue mode.
357
358 .. _queue_mode:
359
360 QUEUE MODES
361 -----------
362
363 Different queue modes are available with some plugins (check for
364 ``queue_mode`` presence in plugin config).
365
366 mpd-sima tries preferably to chose among unplayed artists or at least
367 not recently played artist.
368
369 ``track``
370     Queue a similar track chosen at random from a similar artist.
371
372 ``top``
373     Queue a track from a similar artist, chosen among "top tracks"
374     according to last.fm data mining.
375
376 ``album``
377     Queue a whole album chosen at random from a similar artist.
378
379     *Nota Bene:* Due to the track point of view of database build upon
380     tracks tags an album lookup for a specific artist will return albums
381     as soon as this artist appears in a single track of the album. For
382     instance looking for album from "The Velvet Underground" will fetch
383     "Last Days" and "Juno" OSTs because the band appears on the
384     soundtrack of these two movies. A solution is for you to set
385     AlbumArtists tag to something different than the actual artist of the
386     track. For compilations, OSTs etc. a strong convention is to use
387     "Various Artists" for this tag.
388
389     mpd-sima is currently looking for AlbumArtists tags and avoid album
390     where this tag is set with "Various Artists". If a single track
391     within an album is found with AlbumArtists:"Various Artists" the
392     complete album is skipped and won't be queued.
393
394 .. include:: files.rst
395 .. include:: seealso.rst
396 .. include:: info.rst