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