Commit | Line | Data |
---|---|---|
460b9539 | 1 | .\" |
b50cfb8a | 2 | .\" Copyright (C) 2004-2009 Richard Kettlewell |
460b9539 | 3 | .\" |
e7eb3a27 | 4 | .\" This program is free software: you can redistribute it and/or modify |
460b9539 | 5 | .\" it under the terms of the GNU General Public License as published by |
e7eb3a27 | 6 | .\" the Free Software Foundation, either version 3 of the License, or |
460b9539 | 7 | .\" (at your option) any later version. |
e7eb3a27 RK |
8 | .\" |
9 | .\" This program is distributed in the hope that it will be useful, | |
10 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | .\" GNU General Public License for more details. | |
13 | .\" | |
460b9539 | 14 | .\" You should have received a copy of the GNU General Public License |
e7eb3a27 | 15 | .\" along with this program. If not, see <http://www.gnu.org/licenses/>. |
460b9539 | 16 | .\" |
17 | .TH disorder_config 5 | |
18 | .SH NAME | |
19 | pkgconfdir/config - DisOrder jukebox configuration | |
20 | .SH DESCRIPTION | |
21 | The purpose of DisOrder is to organize and play digital audio files, under the | |
c0c23a60 | 22 | control of multiple users. |
00753f26 RK |
23 | \fIpkgconfdir/config\fR is the primary configuration file; the web interface |
24 | uses a number of others (see \fBdisorder.cgi\fR(8)). | |
460b9539 | 25 | .SS Tracks |
26 | DisOrder can be configured with multiple collections of tracks, indexing them | |
27 | by their filename, and picking players on the basis of filename patterns (for | |
28 | instance, "*.mp3"). | |
29 | .PP | |
30 | Although the model is of filenames, it is not inherent that there are | |
31 | corresponding real files - merely that they can be interpreted by the chosen | |
c0c23a60 RK |
32 | player. |
33 | See \fBdisorder\fR(3) for more details about this. | |
460b9539 | 34 | .PP |
c0c23a60 RK |
35 | Each track can have a set of preferences associated with it. |
36 | These are simple key-value pairs; they can be used for anything you | |
37 | like, but a number of keys have specific meanings. | |
3d1452ab | 38 | See \fBdisorder_preferences\fR(5) for more details about these. |
460b9539 | 39 | .SS "Track Names" |
40 | Track names are derived from filenames under the control of regular | |
41 | expressions, rather than attempting to interpret format-specific embedded name | |
c0c23a60 RK |
42 | information. |
43 | They can be overridden by setting preferences. | |
460b9539 | 44 | .PP |
45 | Names for display are distinguished from names for sorting, so with the right | |
46 | underlying filenames an album can be displayed in its original order even if | |
47 | the displayed track titles are not lexically sorted. | |
48 | .SS "Server State" | |
49 | A collection of global preferences define various bits of server state: whether | |
50 | random play is enabled, what tags to check for when picking at random, etc. | |
3d1452ab | 51 | See \fBdisorder_preferences\fR(5) for more information. |
460b9539 | 52 | .SS "Users And Access Control" |
c0c23a60 RK |
53 | DisOrder distinguishes between multiple users. |
54 | This is for access control and reporting, not to provide different | |
55 | views of the world: i.e. preferences and so on are global. | |
460b9539 | 56 | .PP |
eb5dc014 | 57 | Each user has an associated set of rights which contorl which commands they may |
c0c23a60 RK |
58 | execute. |
59 | Normally you would give all users most rights, and expect them to | |
eb5dc014 RK |
60 | cooperate (they are after all presumed to be in a shared sound environment). |
61 | .PP | |
62 | The full set of rights are: | |
63 | .TP | |
64 | .B read | |
65 | User can perform read-only operations | |
66 | .TP | |
67 | .B play | |
68 | User can add tracks to the queue | |
69 | .TP | |
70 | .B "move any" | |
71 | User can move any track | |
72 | .TP | |
73 | .B "move mine" | |
74 | User can move their own tracks | |
75 | .TP | |
76 | .B "move random" | |
77 | User can move randomly chosen tracks | |
78 | .TP | |
79 | .B "remove any" | |
80 | User can remove any track | |
81 | .TP | |
82 | .B "remove mine" | |
83 | User can remove their own tracks | |
84 | .TP | |
85 | .B "remove random" | |
86 | User can remove randomly chosen tracks | |
87 | .TP | |
88 | .B "scratch any" | |
89 | User can scratch any track | |
90 | .TP | |
91 | .B "scratch mine" | |
92 | User can scratch their own tracks | |
93 | .TP | |
94 | .B "scratch random" | |
95 | User can scratch randomly chosen tracks | |
96 | .TP | |
97 | .B volume | |
98 | User can change the volume | |
99 | .TP | |
100 | .B admin | |
101 | User can perform admin operations | |
102 | .TP | |
103 | .B rescan | |
104 | User can initiate a rescan | |
105 | .TP | |
106 | .B register | |
c0c23a60 RK |
107 | User can register new users. |
108 | Normally only the | |
eb5dc014 RK |
109 | .B guest |
110 | user would have this right. | |
111 | .TP | |
112 | .B userinfo | |
113 | User can edit their own userinfo | |
114 | .TP | |
115 | .B prefs | |
116 | User can modify track preferences | |
117 | .TP | |
118 | .B "global prefs" | |
119 | User can modify global preferences | |
120 | .TP | |
121 | .B pause | |
122 | User can pause/resume | |
460b9539 | 123 | .PP |
c0c23a60 RK |
124 | Access control is entirely used-based. |
125 | If you configure DisOrder to listen for TCP/IP connections then it will | |
126 | accept a connection from anywhere provided the right password is | |
127 | available. | |
128 | Passwords are never transmitted over TCP/IP connections in clear, | |
129 | but everything else is. | |
130 | The expected model is that host-based access control is imposed at | |
131 | the network layer. | |
460b9539 | 132 | .SS "Web Interface" |
133 | The web interface is controlled by a collection of template files, one for each | |
c0c23a60 RK |
134 | kind of page, and a collection of option files. |
135 | These are split up and separate from the main configuration file to | |
5c1ae3bc RK |
136 | .PP |
137 | See \fBdisorder.cgi\fR(8) for more information. | |
180dcdb0 | 138 | .SS "Searching And Tags" |
c0c23a60 RK |
139 | Search strings contain a list of search terms separated by spaces. |
140 | A search term can either be a single word or a tag, prefixed with "tag:". | |
180dcdb0 RK |
141 | .PP |
142 | Search words are compared without regard to letter case or accents; thus, all | |
143 | of the following will be considered to be equal to one another: | |
144 | .PP | |
145 | .nf | |
146 | LATIN CAPITAL LETTER E | |
147 | LATIN SMALL LETTER E | |
148 | LATIN CAPITAL LETTER E WITH GRAVE | |
149 | LATIN SMALL LETTER E WITH GRAVE | |
150 | LATIN CAPITAL LETTER E plus COMBINING GRAVE ACCENT | |
151 | LATIN SMALL LETTER E plus COMBINING GRAVE ACCENT | |
152 | .fi | |
153 | .PP | |
154 | The same rules apply to tags but in addition leading and trailing whitespace is | |
155 | disregarded and all whitespace sequences are treated as equal when they appear | |
156 | as internal whitespace. | |
157 | .PP | |
158 | Where several tags are listed, for instance the tags preference for a track, | |
c0c23a60 RK |
159 | the tags are separated by commas. |
160 | Therefore tags may not contain commas. | |
460b9539 | 161 | .SH "CONFIGURATION FILE" |
162 | .SS "General Syntax" | |
163 | Lines are split into fields separated by whitespace (space, tab, line | |
c0c23a60 RK |
164 | feed, carriage return, form feed). |
165 | Comments are started by the number sign ("#"). | |
460b9539 | 166 | .PP |
167 | Fields may be unquoted (in which case they may not contain spaces and | |
168 | may not start with a quotation mark or apostrophe) or quoted by either | |
c0c23a60 RK |
169 | quotation marks or apostrophes. |
170 | Inside quoted fields every character stands for itself, except that | |
171 | a backslash can only appear as part of one of the following escape sequences: | |
460b9539 | 172 | .TP |
173 | .B \e\e | |
174 | Backslash | |
175 | .TP | |
176 | .B \e" | |
177 | Quotation mark | |
178 | .\" " | |
179 | .TP | |
180 | .B \e' | |
181 | Apostrophe | |
182 | .TP | |
183 | .B \en | |
184 | Line feed | |
185 | .PP | |
186 | No other escape sequences are allowed. | |
187 | .PP | |
188 | Within any line the first field is a configuration command and any | |
c0c23a60 RK |
189 | further fields are parameters. |
190 | Lines with no fields are ignored. | |
460b9539 | 191 | .PP |
192 | After editing the config file use \fBdisorder reconfigure\fR to make | |
c0c23a60 RK |
193 | it re-read it. |
194 | If there is anything wrong with it the daemon will record a log | |
195 | message and ignore the new config file. | |
196 | (You should fix it before next terminating and restarting the daemon, | |
197 | as it cannot start up without a valid config file.) | |
eb5dc014 RK |
198 | .SS "Configuration Files" |
199 | Configuration files are read in the following order: | |
200 | .TP | |
201 | .I pkgconfdir/config | |
202 | .TP | |
203 | .I pkgconfdir/config.private | |
c0c23a60 RK |
204 | Should be readable only by the jukebox group. |
205 | Not really useful any more and will be abolished in future. | |
eb5dc014 | 206 | .TP |
90ad6c6e | 207 | .I ~\fRUSERNAME\fI/.disorder/passwd |
c0c23a60 RK |
208 | Per-user client configuration. |
209 | Optional but if it exists must be readable only by the relevant user. | |
210 | Would normally contain a \fBpassword\fR directive. | |
5b14453f | 211 | .TP |
90ad6c6e | 212 | .I pkgconfdir/config.\fRUSERNAME |
c0c23a60 RK |
213 | Per-user system-controlled client configuration. |
214 | Optional but if it exists must be readable only by the relevant user. | |
215 | Would normally contain a \fBpassword\fR directive. | |
5b14453f RK |
216 | .IP |
217 | The prefererred location for per-user passwords is \fI~/.disorder/passwd\fR and | |
c0c23a60 | 218 | \fBdisorder authorize\fR writes there now. |
460b9539 | 219 | .SS "Global Configuration" |
220 | .TP | |
221 | .B home \fIDIRECTORY\fR | |
c0c23a60 RK |
222 | The home directory for state files. |
223 | Defaults to | |
460b9539 | 224 | .IR pkgstatedir . |
659d87e8 | 225 | The server will create this directory on startup if it does not exist. |
460b9539 | 226 | .TP |
0c6bcae0 | 227 | .B plugins \fIPATH\fR |
c0c23a60 RK |
228 | Adds a directory to the plugin path. |
229 | (This is also used by the web interface.) | |
460b9539 | 230 | .IP |
231 | Plugins are opened the first time they are required and never after, | |
232 | so after changing a plugin you must restart the server before it is | |
233 | guaranteed to take effect. | |
40c30921 RK |
234 | .IP |
235 | If | |
236 | .B plugins | |
237 | is used without arguments the plugin path is cleared. | |
460b9539 | 238 | .SS "Server Configuration" |
239 | .TP | |
240 | .B alias \fIPATTERN\fR | |
241 | Defines the pattern use construct virtual filenames from \fBtrackname_\fR | |
242 | preferences. | |
243 | .IP | |
244 | Most characters stand for themselves, the exception being \fB{\fR which is used | |
245 | to insert a track name part in the form \fB{\fIname\fB}\fR or | |
246 | \fB{/\fIname\fB}\fR. | |
247 | .IP | |
248 | The difference is that the first form just inserts the name part while the | |
249 | second prefixes it with a \fB/\fR if it is nonempty. | |
250 | .IP | |
251 | The pattern should not attempt to include the collection root, which is | |
252 | automatically included, but should include the proper extension. | |
253 | .IP | |
254 | The default is \fB{/artist}{/album}{/title}{ext}\fR. | |
255 | .TP | |
bd8895a8 | 256 | .B api \fINAME\fR |
c0c23a60 RK |
257 | Selects the backend used to play sound and to set the volume. |
258 | The following options are available: | |
bd8895a8 | 259 | .RS |
260 | .TP | |
261 | .B alsa | |
c0c23a60 RK |
262 | Use the ALSA API. |
263 | This is only available on Linux systems, on which it is the default. | |
bd8895a8 | 264 | .TP |
265 | .B coreaudio | |
c0c23a60 RK |
266 | Use Apple Core Audio. |
267 | This only available on OS X systems, on which it is the default. | |
bd8895a8 | 268 | .TP |
269 | .B oss | |
c0c23a60 RK |
270 | Use the OSS (/dev/dsp) API. |
271 | Not available on all platforms. | |
bd8895a8 | 272 | .TP |
273 | .B command | |
c0c23a60 RK |
274 | Execute a command. |
275 | This is the default if | |
bd8895a8 | 276 | .B speaker_command |
277 | is specified, or if no native is available. | |
278 | .TP | |
b50cfb8a | 279 | .B rtp |
c0c23a60 RK |
280 | Transmit audio over the network. |
281 | This is the default if \fBbroadcast\fR is specified. | |
282 | You can use | |
bd8895a8 | 283 | .BR disorder-playrtp (1) |
284 | to receive and play the resulting stream on Linux and OS X. | |
b50cfb8a RK |
285 | .B network |
286 | is a deprecated synonym for this API. | |
bd8895a8 | 287 | .RE |
288 | .TP | |
25ca855b | 289 | .B authorization_algorithm \fIALGORITHM\fR |
c0c23a60 RK |
290 | Defines the algorithm used to authenticate clients. |
291 | The valid options are sha1 (the default), sha256, sha384 and sha512. | |
292 | See | |
637fdea3 RK |
293 | .BR disorder_protocol (5) |
294 | for more details. | |
295 | .TP | |
30ad4dab | 296 | .B broadcast \fIADDRESS\fR \fIPORT\fR |
c0c23a60 | 297 | Transmit sound data to \fIADDRESS\fR using UDP port \fIPORT\fR. |
b50cfb8a | 298 | This implies \fBapi rtp\fR. |
61941295 RK |
299 | .IP |
300 | See also \fBmulticast_loop\fR and \fBmulticast_ttl\fR. | |
30ad4dab | 301 | .TP |
302 | .B broadcast_from \fIADDRESS\fR \fIPORT\fR | |
303 | Sets the (local) source address used by \fBbroadcast\fR. | |
304 | .TP | |
460b9539 | 305 | .B channel \fICHANNEL\fR |
bd8895a8 | 306 | The mixer channel that the volume control should use. |
307 | .IP | |
308 | For \fBapi oss\fR the possible values are: | |
460b9539 | 309 | .RS |
310 | .TP 8 | |
311 | .B pcm | |
c0c23a60 RK |
312 | Output level for the audio device. |
313 | This is probably what you want and is the default. | |
460b9539 | 314 | .TP |
315 | .B speaker | |
316 | Output level for the PC speaker, if that is connected to the sound card. | |
317 | .TP | |
318 | .B pcm2 | |
319 | Output level for alternative codec device. | |
320 | .TP | |
321 | .B vol | |
c0c23a60 RK |
322 | Master output level. |
323 | The OSS documentation recommends against using this, as it affects all | |
324 | output devices. | |
460b9539 | 325 | .RE |
326 | .IP | |
bd8895a8 | 327 | You can also specify channels by number, if you know the right value. |
328 | .IP | |
c0c23a60 RK |
329 | For \fBapi alsa\fR, this is the name of the mixer control to use. |
330 | The default is \fBPCM\fR. | |
331 | Use \fBamixer scontrols\fR or similar to get a full list. | |
bd8895a8 | 332 | .IP |
333 | For \fBapi coreaudio\fR, volume setting is not currently supported. | |
460b9539 | 334 | .TP |
335 | .B collection \fIMODULE\fR \fIENCODING\fR \fIROOT\fR | |
01cef138 RK |
336 | .TP |
337 | .B collection \fIMODULE\fR \fIROOT\fR | |
338 | .TP | |
339 | .B collection \fIROOT\fR | |
460b9539 | 340 | Define a collection of tracks. |
341 | .IP | |
342 | \fIMODULE\fR defines which plugin module should be used for this | |
c0c23a60 RK |
343 | collection. |
344 | Use the supplied \fBfs\fR module for tracks that exist as ordinary | |
345 | files in the filesystem. | |
346 | If no \fIMODULE\fR is specified then \fBfs\fR is assumed. | |
347 | .IP | |
348 | \fIENCODING\fR defines the encoding of filenames in this collection. | |
349 | For \fBfs\fR this would be the encoding you use for filenames. | |
0d350ff0 | 350 | Examples might be \fBiso\-8859\-1\fR or \fButf\-8\fR. |
c0c23a60 RK |
351 | If no encoding is specified then the current locale's character encoding |
352 | is used. | |
460b9539 | 353 | .IP |
01cef138 RK |
354 | NB that this default depends on the locale the server runs in, which is not |
355 | necessarily the same as that of ordinary users, depending how the system is | |
c0c23a60 RK |
356 | configured. |
357 | It's best to explicitly specify it to be certain. | |
460b9539 | 358 | .IP |
359 | \fIROOT\fR is the root in the filesystem of the filenames and is | |
c0c23a60 RK |
360 | passed to the plugin module. |
361 | It must be an absolute path and should not end with a "/". | |
460b9539 | 362 | .TP |
dafbdc04 RK |
363 | .B cookie_key_lifetime \fISECONDS\fR |
364 | Lifetime of the signing key used in constructing cookies. The default is one | |
365 | week. | |
366 | .TP | |
367 | .B cookie_login_lifetime \fISECONDS\fR | |
368 | Lifetime of a cookie enforced by the server. When the cookie expires the user | |
369 | will have to log in again even if their browser has remembered the cookie that | |
370 | long. The default is one day. | |
371 | .TP | |
04e1fa7c | 372 | .B default_rights \fIRIGHTS\fR |
c0c23a60 RK |
373 | Defines the set of rights given to new users. |
374 | The argument is a comma-separated list of rights. | |
375 | For the possible values see | |
04e1fa7c RK |
376 | .B "Users And Access Control" |
377 | above. | |
378 | .IP | |
379 | The default is to allow everything except \fBadmin\fR and \fBregister\fR | |
380 | (modified in legacy configurations by the obsolete \fBrestrict\fR directive). | |
381 | .TP | |
460b9539 | 382 | .B device \fINAME\fR |
bd8895a8 | 383 | Sound output device. |
384 | .IP | |
c0c23a60 RK |
385 | For \fBapi oss\fR this is the path to the device to use. |
386 | If it is set to \fBdefault\fR then \fI/dev/dsp\fR and \fI/dev/audio\fR | |
387 | will be tried. | |
bd8895a8 | 388 | .IP |
389 | For \fBapi alsa\fR this is the device name to use. | |
390 | .IP | |
f5fd9a6b RK |
391 | For \fBapi coreaudio\fR this can be either the UID or the human-readable |
392 | name of the desired device. | |
393 | For a list of names, visit System Preferences -> Sound and look at the Type column. | |
394 | For example, you might use "Built-in Output" for the built-in speaker | |
395 | or "Built-in Line Output" if you have connected external speakers. | |
396 | Remember to quote the name. | |
bd8895a8 | 397 | .IP |
b25aac59 | 398 | The default is \fBdefault\fR, which is intended to map to whatever the system's |
399 | default is. | |
460b9539 | 400 | .TP |
401 | .B gap \fISECONDS\fR | |
c0c23a60 RK |
402 | Specifies the number of seconds to leave between tracks. |
403 | The default is 0. | |
49a773eb RK |
404 | .IP |
405 | NB this option currently DOES NOT WORK. If there is genuine demand it might be | |
406 | reinstated. | |
460b9539 | 407 | .TP |
408 | .B history \fIINTEGER\fR | |
409 | Specifies the number of recently played tracks to remember (including | |
410 | failed tracks and scratches). | |
411 | .TP | |
412 | .B listen \fR[\fIHOST\fR] \fISERVICE\fR | |
413 | Listen for connections on the address specified by \fIHOST\fR and port | |
c0c23a60 RK |
414 | specified by \fISERVICE\fR. |
415 | If \fIHOST\fR is omitted then listens on all local addresses. | |
460b9539 | 416 | .IP |
417 | Normally the server only listens on a UNIX domain socket. | |
418 | .TP | |
419 | .B lock yes\fR|\fBno | |
c0c23a60 RK |
420 | Determines whether the server locks against concurrent operation. |
421 | Default is \fByes\fR. | |
422 | There is no good reason to set this to \fBno\fR and the option will | |
25ca855b | 423 | probably be removed in a future version. |
460b9539 | 424 | .TP |
bd8895a8 | 425 | .B mixer \fIDEVICE\fR |
426 | The mixer device name, if it needs to be specified separately from | |
427 | \fBdevice\fR. | |
428 | .IP | |
429 | For \fBapi oss\fR this should be the path to the mixer device and the default | |
430 | is \fI/dev/mixer\fR. | |
431 | .IP | |
c0c23a60 RK |
432 | For \fBapi alsa\fR, this is the index of the mixer control to use. |
433 | The default is 0. | |
bd8895a8 | 434 | .IP |
435 | For \fBapi coreaudio\fR, volume setting is not currently supported. | |
460b9539 | 436 | .TP |
61941295 | 437 | .B multicast_loop yes\fR|\fBno |
c0c23a60 RK |
438 | Determines whether multicast packets are loop backed to the sending host. |
439 | The default is \fByes\fR. | |
b50cfb8a | 440 | This only applies if \fBapi\fR is set to \fBrtp\fR and \fBbroadcast\fR |
c0c23a60 | 441 | is actually a multicast address. |
61941295 | 442 | .TP |
23205f9c | 443 | .B multicast_ttl \fIHOPS\fR |
c0c23a60 | 444 | Set the maximum number of hops to send multicast packets. |
b50cfb8a | 445 | This only applies if \fBapi\fR is set to \fBrtp\fR and |
c0c23a60 RK |
446 | \fBbroadcast\fR is actually a multicast address. |
447 | The default is 1. | |
23205f9c | 448 | .TP |
460b9539 | 449 | .B namepart \fIPART\fR \fIREGEXP\fR \fISUBST\fR [\fICONTEXT\fR [\fIREFLAGS\fR]] |
450 | Determines how to extract trackname part \fIPART\fR from a | |
451 | track name (with the collection root part removed). | |
452 | Used in \fB@recent@\fR, \fB@playing@\fR and \fB@search@\fR. | |
453 | .IP | |
c0c23a60 RK |
454 | Track names can be different in different contexts. |
455 | For instance the sort string might include an initial track number, | |
456 | but this would be stripped for the display string. | |
457 | \fICONTEXT\fR should be a glob pattern matching the | |
460b9539 | 458 | contexts in which this directive will be used. |
459 | .IP | |
460 | Valid contexts are \fBsort\fR and \fBdisplay\fR. | |
461 | .IP | |
c0c23a60 RK |
462 | All the \fBnamepart\fR directives are considered in order. |
463 | The first directive for the right part, that matches the desired context, | |
460b9539 | 464 | and with a \fIREGEXP\fR that |
465 | matches the track is used, and the value chosen is constructed from | |
466 | \fISUBST\fR according to the substitution rules below. | |
467 | .IP | |
468 | Note that searches use the raw track name and \fBtrackname_\fR preferences but | |
469 | not (currently) the results of \fBnamepart\fR, so generating words via this option | |
470 | that aren't in the original track name will lead to confusing results. | |
471 | .IP | |
472 | If you supply no \fBnamepart\fR directives at all then a default set will be | |
c0c23a60 RK |
473 | supplied automatically. |
474 | But if you supply even one then you must supply all of them. | |
475 | The defaults are equivalent to: | |
25ca855b RK |
476 | .PP |
477 | .nf | |
478 | namepart title "/([0-9]+ *[-:] *)?([^/]+)\\.[a-zA-Z0-9]+$" $2 display | |
479 | namepart title "/([^/]+)\\.[a-zA-Z0-9]+$" $1 sort | |
480 | namepart album "/([^/]+)/[^/]+$" $1 * | |
481 | namepart artist "/([^/]+)/[^/]+/[^/]+$" $1 * | |
482 | namepart ext "(\\.[a-zA-Z0-9]+)$" $1 * | |
483 | .fi | |
460b9539 | 484 | .TP |
05dcfac6 RK |
485 | .B new_bias \fIWEIGHT\fR |
486 | The weight for new tracks. | |
6151ae7e | 487 | The default is 450000, i.e. recently added tracks are a fifty times as likely |
05dcfac6 RK |
488 | to be picked as normal. |
489 | .TP | |
490 | .B new_bias_age \fISECONDS\fR | |
491 | The maximum age of tracks that \fBnew_bias\fR applies to, in seconds. | |
492 | The default is one week. | |
493 | .TP | |
d742bb47 | 494 | .B new_max \fIMAX\fR |
c0c23a60 RK |
495 | The maximum number of tracks to list when reporting newly noticed tracks. |
496 | The default is 100. | |
d742bb47 | 497 | .TP |
460b9539 | 498 | .B nice_rescan \fIPRIORITY\fR |
c0c23a60 RK |
499 | Set the recan subprocess priority. |
500 | The default is 10. | |
460b9539 | 501 | .IP |
502 | (Note that higher values mean the process gets less CPU time; UNIX priority | |
04e42396 | 503 | values are backwards.) |
460b9539 | 504 | .TP |
505 | .B nice_server \fIPRIORITY\fR | |
c0c23a60 RK |
506 | Set the server priority. |
507 | This is applied to the server at startup time (and not when you reload | |
508 | configuration). | |
509 | The server does not use much CPU itself but this value is inherited | |
510 | by programs it executes. | |
511 | If you have limited CPU then it might help to set this to a small | |
512 | negative value. | |
513 | The default is 0. | |
460b9539 | 514 | .TP |
515 | .B nice_speaker \fIPRIORITY\fR | |
c0c23a60 RK |
516 | Set the speaker process priority. |
517 | This is applied to the speaker process at startup time (and not when | |
518 | you reload the configuration). | |
519 | The speaker process is not massively CPU intensive by today's | |
520 | standards but depends on reasonably timely scheduling. | |
521 | If you have limited CPU then it might help to set this to a small | |
522 | negative value. | |
523 | The default is 0. | |
460b9539 | 524 | .TP |
2a10b70b RK |
525 | .B noticed_history |
526 | The maximum days that a track can survive in the database of newly added | |
c0c23a60 RK |
527 | tracks. |
528 | The default is 31. | |
2a10b70b | 529 | .TP |
0d350ff0 | 530 | .B player \fIPATTERN\fR \fIMODULE\fR [\fIOPTIONS.. [\fB\-\-\fR]] \fIARGS\fR... |
c0c23a60 RK |
531 | Specifies the player for files matching the glob \fIPATTERN\fR. |
532 | \fIMODULE\fR specifies which plugin module to use. | |
460b9539 | 533 | .IP |
534 | The following options are supported: | |
535 | .RS | |
536 | .TP | |
0d350ff0 | 537 | .B \-\-wait\-for\-device\fR[\fB=\fIDEVICE\fR] |
460b9539 | 538 | Waits (for up to a couple of seconds) for the default, or specified, libao |
539 | device to become openable. | |
540 | .TP | |
0d350ff0 | 541 | .B \-\- |
c0c23a60 | 542 | Defines the end of the list of options. |
0d350ff0 | 543 | Needed if the first argument to the plugin starts with a "\-". |
460b9539 | 544 | .RE |
545 | .IP | |
546 | The following are the standard modules: | |
547 | .RS | |
548 | .TP | |
549 | .B exec \fICOMMAND\fR \fIARGS\fR... | |
550 | The command is executed via \fBexecvp\fR(3), not via the shell. | |
551 | The \fBPATH\fR environment variable is searched for the executable if it is not | |
552 | an absolute path. | |
553 | The command is expected to know how to open its own sound device. | |
554 | .TP | |
555 | .B execraw \fICOMMAND\fR \fIARGS\fR... | |
556 | Identical to the \fBexec\fR except that the player is expected to use the | |
ce6c36be | 557 | DisOrder raw player protocol. |
558 | .BR disorder-decode (8) | |
c0c23a60 RK |
559 | can decode several common audio file formats to this format. |
560 | If your favourite format is not supported, but you have a player | |
561 | which uses libao, there is also a libao driver which supports this format; | |
562 | see below for more information about this. | |
460b9539 | 563 | .TP |
564 | .B shell \fR[\fISHELL\fR] \fICOMMAND\fR | |
c0c23a60 RK |
565 | The command is executed using the shell. |
566 | If \fISHELL\fR is specified then that is used, otherwise \fBsh\fR will be used. | |
567 | In either case the \fBPATH\fR environment variable is searched for the shell | |
568 | executable if it is not an absolute path. | |
569 | The track name is stored in the environment variable | |
460b9539 | 570 | \fBTRACK\fR. |
571 | .IP | |
572 | Be careful of the interaction between the configuration file quoting rules and | |
573 | the shell quoting rules. | |
574 | .RE | |
575 | .IP | |
576 | If multiple player commands match a track then the first match is used. | |
62dc3748 RK |
577 | .IP |
578 | For the server to be able to calculate track lengths, there should be a | |
579 | .B tracklength | |
580 | command corresponding to each | |
581 | .B player | |
582 | command. | |
40c30921 RK |
583 | .IP |
584 | If | |
585 | .B player | |
586 | is used without arguments, the list of players is cleared. | |
460b9539 | 587 | .TP |
588 | .B prefsync \fISECONDS\fR | |
c0c23a60 RK |
589 | The interval at which the preferences log file will be synchronised. |
590 | Defaults to 3600, i.e. one hour. | |
460b9539 | 591 | .TP |
459d4402 | 592 | .B queue_pad \fICOUNT\fR |
c0c23a60 RK |
593 | The target size of the queue. |
594 | If random play is enabled then randomly picked tracks will be added until | |
595 | the queue is at least this big. | |
596 | The default is 10. | |
459d4402 | 597 | .TP |
6207d2f3 | 598 | .B reminder_interval \fISECONDS\fR |
c0c23a60 RK |
599 | The minimum number of seconds that must elapse between password reminders. |
600 | The default is 600, i.e. 10 minutes. | |
6207d2f3 | 601 | .TP |
810b8083 RK |
602 | .B remote_userman yes\fR|\fBno |
603 | User management over TCP connection is only allowed if this is set to | |
604 | \fByes\fR. By default it is set to \fBno\fR. | |
605 | .TP | |
cebe3127 RK |
606 | .B replay_min \fISECONDS\fR |
607 | The minimum number of seconds that must elapse after a track has been played | |
608 | before it can be picked at random. The default is 8 hours. If this is set to | |
609 | 0 then there is no limit, though current \fBdisorder-choose\fR will not pick | |
610 | anything currently listed in the recently-played list. | |
611 | .TP | |
405fea4e | 612 | .B sample_format \fIBITS\fB/\fIRATE\fB/\fICHANNELS |
c0c23a60 RK |
613 | Describes the sample format expected by the \fBspeaker_command\fR (below). |
614 | The components of the format specification are as follows: | |
405fea4e | 615 | .RS |
616 | .TP 10 | |
617 | .I BITS | |
c0c23a60 RK |
618 | The number of bits per sample. |
619 | Optionally, may be suffixed by \fBb\fR or \fBl\fR for big-endian and | |
620 | little-endian words. | |
621 | If neither is used the native byte order is assumed. | |
405fea4e | 622 | .TP |
623 | .I RATE | |
624 | The number of samples per second. | |
625 | .TP | |
626 | .I CHANNELS | |
627 | The number of channels. | |
628 | .PP | |
629 | The default is | |
630 | .BR 16/44100/2 . | |
937be4c0 RK |
631 | .PP |
632 | With the | |
b50cfb8a | 633 | .B rtp |
937be4c0 | 634 | backend the sample format is forced to |
e99d42b1 | 635 | .B 16b/44100/2 |
937be4c0 RK |
636 | and with the |
637 | .B coreaudio | |
638 | backend it is forced to | |
639 | .BR 16/44100/2 , | |
640 | in both cases regardless of what is specified in the configuration file. | |
405fea4e | 641 | .RE |
642 | .TP | |
460b9539 | 643 | .B signal \fINAME\fR |
644 | Defines the signal to be sent to track player process groups when tracks are | |
c0c23a60 RK |
645 | scratched. |
646 | The default is \fBSIGKILL\fR. | |
460b9539 | 647 | .IP |
648 | Signals are specified by their full C name, i.e. \fBSIGINT\fR and not \fBINT\fR | |
649 | or \fBInterrupted\fR or whatever. | |
650 | .TP | |
5330d674 | 651 | .B sox_generation \fB0\fR|\fB1 |
0d350ff0 RK |
652 | Determines whether calls to \fBsox\fR(1) should use \fB\-b\fR, \fB\-x\fR, etc (if |
653 | the generation is 0) or \fB\-\fIbits\fR, \fB\-L\fR etc (if it is 1). | |
c0c23a60 RK |
654 | See the documentation for your installed copy of \fBsox\fR to determine |
655 | which you need. | |
419893d7 RK |
656 | The default is set according to the version of sox found when DisOrder was |
657 | built. | |
658 | If you run on a system with a different version of sox, you will need to | |
659 | set this option. | |
5330d674 | 660 | .TP |
bd8895a8 | 661 | .B speaker_backend \fINAME |
662 | This is an alias for \fBapi\fR; see above. | |
663 | .TP | |
405fea4e | 664 | .B speaker_command \fICOMMAND |
665 | Causes the speaker subprocess to pipe audio data into shell command | |
c0c23a60 RK |
666 | \fICOMMAND\fR, rather than writing to a local sound card. |
667 | The sample format is determine by | |
405fea4e | 668 | .B sample_format |
669 | above. | |
77cfc7a2 | 670 | .IP |
671 | Note that if the sample format is wrong then | |
672 | .BR sox (1) | |
c0c23a60 RK |
673 | is invoked to translate it. |
674 | If | |
77cfc7a2 | 675 | .B sox |
676 | is not installed then this will not work. | |
405fea4e | 677 | .TP |
460b9539 | 678 | .B scratch \fIPATH\fR |
c0c23a60 RK |
679 | Specifies a scratch. |
680 | When a track is scratched, a scratch track is played at random. | |
460b9539 | 681 | Scratches are played using the same logic as other tracks. |
682 | .IP | |
683 | At least for the time being, path names of scratches must be encoded using | |
684 | UTF-8 (which means that ASCII will do). | |
40c30921 RK |
685 | .IP |
686 | If \fBscratch\fR is used without arguments then the list of scratches is | |
687 | cleared. | |
460b9539 | 688 | .TP |
689 | .B stopword \fIWORD\fR ... | |
690 | Specifies one or more stopwords that should not take part in searches | |
691 | over track names. | |
40c30921 RK |
692 | .IP |
693 | If \fBstopword\fR is used without arguments then the list of stopwords is | |
694 | cleared. | |
86be0c30 | 695 | .IP |
696 | There is a default set of stopwords built in, but this option can be used to | |
697 | augment or replace that list. | |
62dc3748 RK |
698 | .TP |
699 | .B tracklength \fIPATTERN\fR \fIMODULE\fR | |
700 | Specifies the module used to calculate the length of files matching | |
c0c23a60 RK |
701 | \fIPATTERN\fR. |
702 | \fIMODULE\fR specifies which plugin module to use. | |
40c30921 RK |
703 | .IP |
704 | If \fBtracklength\fR is used without arguments then the list of modules is | |
705 | cleared. | |
eb5dc014 | 706 | .TP |
90ad6c6e | 707 | .B user \fIUSERNAME\fR |
c0c23a60 RK |
708 | Specifies the user to run as. |
709 | Only makes sense if invoked as root (or the target user). | |
460b9539 | 710 | .SS "Client Configuration" |
00753f26 RK |
711 | These options would normally be used in \fI~\fRUSERNAME\fI/.disorder/passwd\fR |
712 | or | |
713 | \fIpkgconfdir/config.\fRUSERNAME. | |
460b9539 | 714 | .TP |
ccf0aafa | 715 | .B connect \fIHOST SERVICE\fR |
460b9539 | 716 | Connect to the address specified by \fIHOST\fR and port specified by |
ccf0aafa | 717 | \fISERVICE\fR. |
00753f26 RK |
718 | .TP |
719 | .B password \fIPASSWORD\fR | |
720 | Specify password. | |
721 | .TP | |
722 | .B username \fIUSERNAME\fR | |
723 | Specify username. | |
3d1452ab | 724 | The default is inferred from the current UID. |
460b9539 | 725 | .SS "Web Interface Configuration" |
00753f26 | 726 | .\" TODO this section is misnamed really... |
460b9539 | 727 | .TP |
e70701e7 | 728 | .B mail_sender \fIADDRESS\fR |
729 | The email address that appears in the From: field of any mail messages sent by | |
c0c23a60 RK |
730 | the web interface. |
731 | This must be set if you have online registration enabled. | |
e70701e7 | 732 | .TP |
460b9539 | 733 | .B refresh \fISECONDS\fR |
c0c23a60 RK |
734 | Specifies the maximum refresh period in seconds. |
735 | Default 15. | |
460b9539 | 736 | .TP |
2eee4b0c RK |
737 | .B sendmail \fIPATH\fR |
738 | The path to the Sendmail executable. | |
739 | This must support the \fB-bs\fR option (Postfix, Exim and Sendmail should all | |
740 | work). | |
741 | The default is the sendmail executable found at compile time. | |
742 | .TP | |
61507e3c RK |
743 | .B short_display \fICHARACTERS\fR |
744 | Defines the maximum number of characters to include in a \fBshort\fR name | |
c0c23a60 RK |
745 | part. |
746 | Default 30. | |
61507e3c | 747 | .TP |
e70701e7 | 748 | .B smtp_server \fIHOSTNAME\fR |
c0c23a60 RK |
749 | The hostname (or address) of the SMTP server to use for sending mail. |
750 | The default is 127.0.0.1. | |
2eee4b0c | 751 | If \fBsendmail\fR is set then that is used instead. |
e70701e7 | 752 | .TP |
460b9539 | 753 | .B transform \fITYPE\fR \fIREGEXP\fR \fISUBST\fR [\fICONTEXT\fR [\fIREFLAGS\fR]] |
754 | Determines how names are sorted and displayed in track choice displays. | |
755 | .IP | |
756 | \fITYPE\fR is the type of transformation; usually \fBtrack\fR or | |
757 | \fBdir\fR but you can define your own. | |
758 | .IP | |
c0c23a60 RK |
759 | \fICONTEXT\fR is a glob pattern matching the context. |
760 | Standard contexts are \fBsort\fR (which determines how directory names | |
761 | are sorted) and \fBdisplay\fR (which determines how they are displayed). | |
762 | Again, you can define your own. | |
460b9539 | 763 | .IP |
c0c23a60 RK |
764 | All the \fBtransform\fR directives are considered in order. |
765 | If the \fITYPE\fR, \fIREGEXP\fR and the \fICONTEXT\fR match | |
460b9539 | 766 | then a new track name is constructed from |
c0c23a60 RK |
767 | \fISUBST\fR according to the substitution rules below. |
768 | If several match then each is executed in order. | |
460b9539 | 769 | .IP |
770 | If you supply no \fBtransform\fR directives at all then a default set will be | |
c0c23a60 RK |
771 | supplied automatically. |
772 | But if you supply even one then you must supply all of them. | |
773 | The defaults are: | |
25ca855b RK |
774 | .PP |
775 | .nf | |
776 | transform track "^.*/([0-9]+ *[-:] *)?([^/]+)\\.[a-zA-Z0-9]+$" $2 display | |
777 | transform track "^.*/([^/]+)\\.[a-zA-Z0-9]+$" $1 sort | |
778 | transform dir "^.*/([^/]+)$" $1 * | |
779 | transform dir "^(the) ([^/]*)" "$2 $1" sort i | |
780 | transform dir "[[:punct:]]" "" sort g | |
781 | .fi | |
460b9539 | 782 | .TP |
783 | .B url \fIURL\fR | |
c0c23a60 RK |
784 | Specifies the URL of the web interface. |
785 | This URL will be used in generated web pages. | |
786 | The default is inferred at runtime, so this option no | |
b64c2805 | 787 | longer needs to be specified. |
460b9539 | 788 | .IP |
789 | This must be the full URL, e.g. \fBhttp://myhost/cgi-bin/jukebox\fR and not | |
790 | \fB/cgi-bin/jukebox\fR. | |
460b9539 | 791 | .SH "GLOBAL PREFERENCES" |
460b9539 | 792 | .SH "LIBAO DRIVER" |
793 | .SS "Raw Protocol Players" | |
794 | Raw protocol players are expected to use the \fBdisorder\fR libao driver. | |
795 | Programs that use libao generally have command line options to select the | |
796 | driver and pass options to it. | |
797 | .SS "Driver Options" | |
798 | The known driver options are: | |
799 | .TP | |
800 | .B fd | |
c0c23a60 RK |
801 | The file descriptor to write to. |
802 | If this is not specified then the driver looks like the environment | |
803 | variable \fBDISORDER_RAW_FD\fR. | |
804 | If that is not set then the default is 1 (i.e. standard output). | |
460b9539 | 805 | .TP |
806 | .B fragile | |
807 | If this is set to a nonzero value then the driver will call \fB_exit\fR(2) if a | |
c0c23a60 RK |
808 | write to the output file descriptor fails. |
809 | This is a workaround for buggy players such as \fBogg123\fR that ignore | |
810 | write errors. | |
3e1616b6 RK |
811 | .SH "REGEXP SUBSTITUTION RULES" |
812 | Regexps are PCRE regexps, as defined in \fBpcrepattern\fR(3). | |
813 | The only option used is \fBPCRE_UTF8\fR. | |
814 | Remember that the configuration file syntax means you have to | |
815 | escape backslashes and quotes inside quoted strings. | |
816 | .PP | |
817 | In a \fISUBST\fR string the following sequences are interpreted | |
818 | specially: | |
819 | .TP | |
820 | .B $1 \fR... \fB$9 | |
821 | These expand to the first to ninth bracketed subexpression. | |
822 | .TP | |
823 | .B $& | |
824 | This expands to the matched part of the subject string. | |
825 | .TP | |
826 | .B $$ | |
827 | This expands to a single \fB$\fR symbol. | |
828 | .PP | |
829 | All other pairs starting with \fB$\fR are undefined (and might be used | |
830 | for something else in the future, so don't rely on the current | |
831 | behaviour.) | |
832 | .PP | |
833 | If \fBi\fR is present in \fIREFLAGS\fR then the match is case-independent. | |
834 | If \fBg\fR is present then all matches are replaced, otherwise only the first | |
835 | match is replaced. | |
460b9539 | 836 | .SH "TRACK NAME PARTS" |
837 | The traditional track name parts are \fBartist\fR, \fBalbum\fR and \fBtitle\fR, | |
c0c23a60 RK |
838 | with the obvious intended meaning. |
839 | These are controlled by configuration and by \fBtrackname_\fR preferences. | |
460b9539 | 840 | .PP |
841 | In addition there are two built-in parts, \fBpath\fR which is the whole path | |
842 | name and \fBext\fR which is the filename extension, including the initial dot | |
843 | (or the empty string if there is not extension). | |
844 | .SH "SEE ALSO" | |
0d350ff0 | 845 | \fBdisorder\fR(1), \fBsox\fR(1), \fBdisorderd\fR(8), \fBdisorder\-dump\fR(8), |
5c1ae3bc | 846 | \fBpcrepattern\fR(3), \fBdisorder_templates\fR(5), \fBdisorder_actions\fR(5), |
3d1452ab | 847 | \fBdisorder.cgi\fR(8), \fBdisorder_preferences\fR(5) |
460b9539 | 848 | .\" Local Variables: |
849 | .\" mode:nroff | |
850 | .\" fill-column:79 | |
851 | .\" End: |