4 Configuration location is ``${XDG_CONFIG_HOME}/mpd_sima/mpd_sima.cfg`` usually ``${XDG_CONFIG_HOME}`` is in ``${HOME}/.config/``.
10 MPD_sima runs without explicit configuration as long as your MPD server is easy
11 to discover (``localhost:6600`` or exposed via environment variables ``MPD_HOST``/``MPD_PORT``).
13 The default configuration is to run in *track mode* with suggestions from
14 last.fm. In addition to `Lastfm` plugin set in **[sima]** section (within *internal*
15 option) there is a `Crop` plugin (keeps 10 tracks behind the currently playing
16 track) and a `Random` plugin (acting as a fallback if `Lastfm` did not find any
22 # Change MPD server here
23 #host = mpdserver.example.org
27 internal = Crop, Lastfm, Random
42 One of the first request added to MPD_sima was album mode. It allows to queue whole album instead of single tracks.
44 Here the configuration keeps the queue plugin *Lastfm* but configures it to queue albums (``queue_mode = album``) and ask for 2 albums to be add.
46 The configuration of MPD_sima in ``sima`` section is also modified for ``queue_length``. The value of 10 is to trigger album queueing when there are 10 tracks or less in the queue.
51 internal = Crop, Lastfm, Random
66 In addition to LastFm there are other *plugins* you can mix together or use alone to have a specific queue mode.
70 With this mode MPD_sima is trying to queue tracks with genre tag similar to previously played tracks.
75 internal = Crop, Genre, Random
85 This mode allows random queuing with different flavour **pure** (total
86 randomness) or **sensible** (use play history to filter chosen tracks).
87 The **sensible** flavour will then tend to play track not in recently played.
89 The history duration is important for this plugin when running in **sensible** flavour since you might exhaust possible tracks to queue if the **history_duration** is larger than the total play time you have in your music library.
94 internal = Crop, Random
95 history_duration = 168
103 This is the most complex and versatile offline mode. "Tags" plugin allows to queue track based on actual tags value.
105 Here is an example to have MPD_sima to queue only electronic music tagged with genres **electonica** or **IDM** or **glitch**:
110 internal = Crop, Tags
113 # Look for files with tagged with genre "electonica" OR "IDM" OR "glitch"
114 genre = electonica, IDM, glitch
116 There are other supported tags, mainly **date**, **originaldate** or
117 **comment** (cf manual for the exact list). You can use more than one, entries
118 in tags sections are ANDed within a single MPD filter to look for titles.
120 For instance setting "genre=rock" and
121 "date=1982,1983,1984,1985,1986,1987,1988,1989" will end up looking for track
122 tagged with genre rock and date within 1982 through 1989:
127 internal = Crop, Tags
131 date = 1982,1983,1984,1985,1986,1987,1988,1989
133 In case you want to make complex search in MPD library you can provide an `MPD
134 filter`_. This is a powerful feature, it comes at the cost of a different syntax, some might find it more readable some wont :D
136 For instance in the previous example you can simply replace **date** with the
137 current filter "`(date =~ '198[2-9]+')`":
142 internal = Crop, Tags
146 filter = (date =~ '198[2-9]+')
148 And even go further and merge genre in the filter using "`(genre == 'rock') AND
149 (date =~ '198[2-9]+')`".
154 internal = Crop, Tags
157 filter = (genre == 'rock' ) AND (date =~ '198[2-9]+')
159 Since the setup for the filter can be tricky and it can be useful to validate
160 the syntax and have a look at what kind of artists the filter would return.
162 You can call MPD_sima to controls the configuration file. For instance with a config in `sima.cfg` run:
166 ./mpd-sima --log-level info --config sima.cfg config-test
169 .. include:: ../links.rst
171 .. vim: spell spelllang=en