Commit | Line | Data |
---|---|---|
460b9539 | 1 | .\" |
8f9616f1 | 2 | .\" Copyright (C) 2004-2008 Richard Kettlewell |
460b9539 | 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 2 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, but | |
10 | .\" WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
12 | .\" 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, write to the Free Software | |
16 | .\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | |
17 | .\" USA | |
18 | .\" | |
19 | .TH disorder_config 5 | |
20 | .SH NAME | |
21 | pkgconfdir/config - DisOrder jukebox configuration | |
22 | .SH DESCRIPTION | |
23 | The purpose of DisOrder is to organize and play digital audio files, under the | |
c0c23a60 RK |
24 | control of multiple users. |
25 | \fIpkgconfdir/config\fR is the primary configuration file but this | |
26 | man page currently documents all of its various configuration files. | |
460b9539 | 27 | .SS Tracks |
28 | DisOrder can be configured with multiple collections of tracks, indexing them | |
29 | by their filename, and picking players on the basis of filename patterns (for | |
30 | instance, "*.mp3"). | |
31 | .PP | |
32 | Although the model is of filenames, it is not inherent that there are | |
33 | corresponding real files - merely that they can be interpreted by the chosen | |
c0c23a60 RK |
34 | player. |
35 | See \fBdisorder\fR(3) for more details about this. | |
460b9539 | 36 | .PP |
c0c23a60 RK |
37 | Each track can have a set of preferences associated with it. |
38 | These are simple key-value pairs; they can be used for anything you | |
39 | like, but a number of keys have specific meanings. | |
40 | See \fBdisorder\fR(1) for more details about these. | |
460b9539 | 41 | .SS "Track Names" |
42 | Track names are derived from filenames under the control of regular | |
43 | expressions, rather than attempting to interpret format-specific embedded name | |
c0c23a60 RK |
44 | information. |
45 | They can be overridden by setting preferences. | |
460b9539 | 46 | .PP |
47 | Names for display are distinguished from names for sorting, so with the right | |
48 | underlying filenames an album can be displayed in its original order even if | |
49 | the displayed track titles are not lexically sorted. | |
50 | .SS "Server State" | |
51 | A collection of global preferences define various bits of server state: whether | |
52 | random play is enabled, what tags to check for when picking at random, etc. | |
53 | .SS "Users And Access Control" | |
c0c23a60 RK |
54 | DisOrder distinguishes between multiple users. |
55 | This is for access control and reporting, not to provide different | |
56 | views of the world: i.e. preferences and so on are global. | |
460b9539 | 57 | .PP |
eb5dc014 | 58 | Each user has an associated set of rights which contorl which commands they may |
c0c23a60 RK |
59 | execute. |
60 | Normally you would give all users most rights, and expect them to | |
eb5dc014 RK |
61 | cooperate (they are after all presumed to be in a shared sound environment). |
62 | .PP | |
63 | The full set of rights are: | |
64 | .TP | |
65 | .B read | |
66 | User can perform read-only operations | |
67 | .TP | |
68 | .B play | |
69 | User can add tracks to the queue | |
70 | .TP | |
71 | .B "move any" | |
72 | User can move any track | |
73 | .TP | |
74 | .B "move mine" | |
75 | User can move their own tracks | |
76 | .TP | |
77 | .B "move random" | |
78 | User can move randomly chosen tracks | |
79 | .TP | |
80 | .B "remove any" | |
81 | User can remove any track | |
82 | .TP | |
83 | .B "remove mine" | |
84 | User can remove their own tracks | |
85 | .TP | |
86 | .B "remove random" | |
87 | User can remove randomly chosen tracks | |
88 | .TP | |
89 | .B "scratch any" | |
90 | User can scratch any track | |
91 | .TP | |
92 | .B "scratch mine" | |
93 | User can scratch their own tracks | |
94 | .TP | |
95 | .B "scratch random" | |
96 | User can scratch randomly chosen tracks | |
97 | .TP | |
98 | .B volume | |
99 | User can change the volume | |
100 | .TP | |
101 | .B admin | |
102 | User can perform admin operations | |
103 | .TP | |
104 | .B rescan | |
105 | User can initiate a rescan | |
106 | .TP | |
107 | .B register | |
c0c23a60 RK |
108 | User can register new users. |
109 | Normally only the | |
eb5dc014 RK |
110 | .B guest |
111 | user would have this right. | |
112 | .TP | |
113 | .B userinfo | |
114 | User can edit their own userinfo | |
115 | .TP | |
116 | .B prefs | |
117 | User can modify track preferences | |
118 | .TP | |
119 | .B "global prefs" | |
120 | User can modify global preferences | |
121 | .TP | |
122 | .B pause | |
123 | User can pause/resume | |
460b9539 | 124 | .PP |
c0c23a60 RK |
125 | Access control is entirely used-based. |
126 | If you configure DisOrder to listen for TCP/IP connections then it will | |
127 | accept a connection from anywhere provided the right password is | |
128 | available. | |
129 | Passwords are never transmitted over TCP/IP connections in clear, | |
130 | but everything else is. | |
131 | The expected model is that host-based access control is imposed at | |
132 | the network layer. | |
460b9539 | 133 | .SS "Web Interface" |
134 | The web interface is controlled by a collection of template files, one for each | |
c0c23a60 RK |
135 | kind of page, and a collection of option files. |
136 | These are split up and separate from the main configuration file to | |
137 | make it more convenient to override specific bits. | |
460b9539 | 138 | .PP |
139 | The web interface connects to the DisOrder server like any other user, though | |
c0c23a60 RK |
140 | it is given a special privilege to "become" any other user. |
141 | (Thus, any process with the same UID as the web interface is very | |
142 | powerful as far as DisOrder goes. | |
143 | This model will be changed in a future version.) | |
460b9539 | 144 | .PP |
145 | Access control to the web interface is (currently) separate from DisOrder's own | |
146 | access control (HTTP authentication is required) but uses the same user | |
147 | namespace. | |
180dcdb0 | 148 | .SS "Searching And Tags" |
c0c23a60 RK |
149 | Search strings contain a list of search terms separated by spaces. |
150 | A search term can either be a single word or a tag, prefixed with "tag:". | |
180dcdb0 RK |
151 | .PP |
152 | Search words are compared without regard to letter case or accents; thus, all | |
153 | of the following will be considered to be equal to one another: | |
154 | .PP | |
155 | .nf | |
156 | LATIN CAPITAL LETTER E | |
157 | LATIN SMALL LETTER E | |
158 | LATIN CAPITAL LETTER E WITH GRAVE | |
159 | LATIN SMALL LETTER E WITH GRAVE | |
160 | LATIN CAPITAL LETTER E plus COMBINING GRAVE ACCENT | |
161 | LATIN SMALL LETTER E plus COMBINING GRAVE ACCENT | |
162 | .fi | |
163 | .PP | |
164 | The same rules apply to tags but in addition leading and trailing whitespace is | |
165 | disregarded and all whitespace sequences are treated as equal when they appear | |
166 | as internal whitespace. | |
167 | .PP | |
168 | Where several tags are listed, for instance the tags preference for a track, | |
c0c23a60 RK |
169 | the tags are separated by commas. |
170 | Therefore tags may not contain commas. | |
460b9539 | 171 | .SH "CONFIGURATION FILE" |
172 | .SS "General Syntax" | |
173 | Lines are split into fields separated by whitespace (space, tab, line | |
c0c23a60 RK |
174 | feed, carriage return, form feed). |
175 | Comments are started by the number sign ("#"). | |
460b9539 | 176 | .PP |
177 | Fields may be unquoted (in which case they may not contain spaces and | |
178 | may not start with a quotation mark or apostrophe) or quoted by either | |
c0c23a60 RK |
179 | quotation marks or apostrophes. |
180 | Inside quoted fields every character stands for itself, except that | |
181 | a backslash can only appear as part of one of the following escape sequences: | |
460b9539 | 182 | .TP |
183 | .B \e\e | |
184 | Backslash | |
185 | .TP | |
186 | .B \e" | |
187 | Quotation mark | |
188 | .\" " | |
189 | .TP | |
190 | .B \e' | |
191 | Apostrophe | |
192 | .TP | |
193 | .B \en | |
194 | Line feed | |
195 | .PP | |
196 | No other escape sequences are allowed. | |
197 | .PP | |
198 | Within any line the first field is a configuration command and any | |
c0c23a60 RK |
199 | further fields are parameters. |
200 | Lines with no fields are ignored. | |
460b9539 | 201 | .PP |
202 | After editing the config file use \fBdisorder reconfigure\fR to make | |
c0c23a60 RK |
203 | it re-read it. |
204 | If there is anything wrong with it the daemon will record a log | |
205 | message and ignore the new config file. | |
206 | (You should fix it before next terminating and restarting the daemon, | |
207 | as it cannot start up without a valid config file.) | |
eb5dc014 RK |
208 | .SS "Configuration Files" |
209 | Configuration files are read in the following order: | |
210 | .TP | |
211 | .I pkgconfdir/config | |
212 | .TP | |
213 | .I pkgconfdir/config.private | |
c0c23a60 RK |
214 | Should be readable only by the jukebox group. |
215 | Not really useful any more and will be abolished in future. | |
eb5dc014 | 216 | .TP |
90ad6c6e | 217 | .I ~\fRUSERNAME\fI/.disorder/passwd |
c0c23a60 RK |
218 | Per-user client configuration. |
219 | Optional but if it exists must be readable only by the relevant user. | |
220 | Would normally contain a \fBpassword\fR directive. | |
5b14453f | 221 | .TP |
90ad6c6e | 222 | .I pkgconfdir/config.\fRUSERNAME |
c0c23a60 RK |
223 | Per-user system-controlled client configuration. |
224 | Optional but if it exists must be readable only by the relevant user. | |
225 | Would normally contain a \fBpassword\fR directive. | |
5b14453f RK |
226 | .IP |
227 | The prefererred location for per-user passwords is \fI~/.disorder/passwd\fR and | |
c0c23a60 | 228 | \fBdisorder authorize\fR writes there now. |
460b9539 | 229 | .SS "Global Configuration" |
230 | .TP | |
231 | .B home \fIDIRECTORY\fR | |
c0c23a60 RK |
232 | The home directory for state files. |
233 | Defaults to | |
460b9539 | 234 | .IR pkgstatedir . |
659d87e8 | 235 | The server will create this directory on startup if it does not exist. |
460b9539 | 236 | .TP |
0c6bcae0 | 237 | .B plugins \fIPATH\fR |
c0c23a60 RK |
238 | Adds a directory to the plugin path. |
239 | (This is also used by the web interface.) | |
460b9539 | 240 | .IP |
241 | Plugins are opened the first time they are required and never after, | |
242 | so after changing a plugin you must restart the server before it is | |
243 | guaranteed to take effect. | |
40c30921 RK |
244 | .IP |
245 | If | |
246 | .B plugins | |
247 | is used without arguments the plugin path is cleared. | |
460b9539 | 248 | .SS "Server Configuration" |
249 | .TP | |
250 | .B alias \fIPATTERN\fR | |
251 | Defines the pattern use construct virtual filenames from \fBtrackname_\fR | |
252 | preferences. | |
253 | .IP | |
254 | Most characters stand for themselves, the exception being \fB{\fR which is used | |
255 | to insert a track name part in the form \fB{\fIname\fB}\fR or | |
256 | \fB{/\fIname\fB}\fR. | |
257 | .IP | |
258 | The difference is that the first form just inserts the name part while the | |
259 | second prefixes it with a \fB/\fR if it is nonempty. | |
260 | .IP | |
261 | The pattern should not attempt to include the collection root, which is | |
262 | automatically included, but should include the proper extension. | |
263 | .IP | |
264 | The default is \fB{/artist}{/album}{/title}{ext}\fR. | |
265 | .TP | |
bd8895a8 | 266 | .B api \fINAME\fR |
c0c23a60 RK |
267 | Selects the backend used to play sound and to set the volume. |
268 | The following options are available: | |
bd8895a8 | 269 | .RS |
270 | .TP | |
271 | .B alsa | |
c0c23a60 RK |
272 | Use the ALSA API. |
273 | This is only available on Linux systems, on which it is the default. | |
bd8895a8 | 274 | .TP |
275 | .B coreaudio | |
c0c23a60 RK |
276 | Use Apple Core Audio. |
277 | This only available on OS X systems, on which it is the default. | |
bd8895a8 | 278 | .TP |
279 | .B oss | |
c0c23a60 RK |
280 | Use the OSS (/dev/dsp) API. |
281 | Not available on all platforms. | |
bd8895a8 | 282 | .TP |
283 | .B command | |
c0c23a60 RK |
284 | Execute a command. |
285 | This is the default if | |
bd8895a8 | 286 | .B speaker_command |
287 | is specified, or if no native is available. | |
288 | .TP | |
289 | .B network | |
c0c23a60 RK |
290 | Transmit audio over the network. |
291 | This is the default if \fBbroadcast\fR is specified. | |
292 | You can use | |
bd8895a8 | 293 | .BR disorder-playrtp (1) |
294 | to receive and play the resulting stream on Linux and OS X. | |
295 | .RE | |
296 | .TP | |
25ca855b | 297 | .B authorization_algorithm \fIALGORITHM\fR |
c0c23a60 RK |
298 | Defines the algorithm used to authenticate clients. |
299 | The valid options are sha1 (the default), sha256, sha384 and sha512. | |
300 | See | |
637fdea3 RK |
301 | .BR disorder_protocol (5) |
302 | for more details. | |
303 | .TP | |
30ad4dab | 304 | .B broadcast \fIADDRESS\fR \fIPORT\fR |
c0c23a60 RK |
305 | Transmit sound data to \fIADDRESS\fR using UDP port \fIPORT\fR. |
306 | This implies \fBapi network\fR. | |
61941295 RK |
307 | .IP |
308 | See also \fBmulticast_loop\fR and \fBmulticast_ttl\fR. | |
30ad4dab | 309 | .TP |
310 | .B broadcast_from \fIADDRESS\fR \fIPORT\fR | |
311 | Sets the (local) source address used by \fBbroadcast\fR. | |
312 | .TP | |
460b9539 | 313 | .B channel \fICHANNEL\fR |
bd8895a8 | 314 | The mixer channel that the volume control should use. |
315 | .IP | |
316 | For \fBapi oss\fR the possible values are: | |
460b9539 | 317 | .RS |
318 | .TP 8 | |
319 | .B pcm | |
c0c23a60 RK |
320 | Output level for the audio device. |
321 | This is probably what you want and is the default. | |
460b9539 | 322 | .TP |
323 | .B speaker | |
324 | Output level for the PC speaker, if that is connected to the sound card. | |
325 | .TP | |
326 | .B pcm2 | |
327 | Output level for alternative codec device. | |
328 | .TP | |
329 | .B vol | |
c0c23a60 RK |
330 | Master output level. |
331 | The OSS documentation recommends against using this, as it affects all | |
332 | output devices. | |
460b9539 | 333 | .RE |
334 | .IP | |
bd8895a8 | 335 | You can also specify channels by number, if you know the right value. |
336 | .IP | |
c0c23a60 RK |
337 | For \fBapi alsa\fR, this is the name of the mixer control to use. |
338 | The default is \fBPCM\fR. | |
339 | Use \fBamixer scontrols\fR or similar to get a full list. | |
bd8895a8 | 340 | .IP |
341 | For \fBapi coreaudio\fR, volume setting is not currently supported. | |
460b9539 | 342 | .TP |
343 | .B collection \fIMODULE\fR \fIENCODING\fR \fIROOT\fR | |
01cef138 RK |
344 | .TP |
345 | .B collection \fIMODULE\fR \fIROOT\fR | |
346 | .TP | |
347 | .B collection \fIROOT\fR | |
460b9539 | 348 | Define a collection of tracks. |
349 | .IP | |
350 | \fIMODULE\fR defines which plugin module should be used for this | |
c0c23a60 RK |
351 | collection. |
352 | Use the supplied \fBfs\fR module for tracks that exist as ordinary | |
353 | files in the filesystem. | |
354 | If no \fIMODULE\fR is specified then \fBfs\fR is assumed. | |
355 | .IP | |
356 | \fIENCODING\fR defines the encoding of filenames in this collection. | |
357 | For \fBfs\fR this would be the encoding you use for filenames. | |
0d350ff0 | 358 | Examples might be \fBiso\-8859\-1\fR or \fButf\-8\fR. |
c0c23a60 RK |
359 | If no encoding is specified then the current locale's character encoding |
360 | is used. | |
460b9539 | 361 | .IP |
01cef138 RK |
362 | NB that this default depends on the locale the server runs in, which is not |
363 | necessarily the same as that of ordinary users, depending how the system is | |
c0c23a60 RK |
364 | configured. |
365 | It's best to explicitly specify it to be certain. | |
460b9539 | 366 | .IP |
367 | \fIROOT\fR is the root in the filesystem of the filenames and is | |
c0c23a60 RK |
368 | passed to the plugin module. |
369 | It must be an absolute path and should not end with a "/". | |
460b9539 | 370 | .TP |
dafbdc04 RK |
371 | .B cookie_key_lifetime \fISECONDS\fR |
372 | Lifetime of the signing key used in constructing cookies. The default is one | |
373 | week. | |
374 | .TP | |
375 | .B cookie_login_lifetime \fISECONDS\fR | |
376 | Lifetime of a cookie enforced by the server. When the cookie expires the user | |
377 | will have to log in again even if their browser has remembered the cookie that | |
378 | long. The default is one day. | |
379 | .TP | |
04e1fa7c | 380 | .B default_rights \fIRIGHTS\fR |
c0c23a60 RK |
381 | Defines the set of rights given to new users. |
382 | The argument is a comma-separated list of rights. | |
383 | For the possible values see | |
04e1fa7c RK |
384 | .B "Users And Access Control" |
385 | above. | |
386 | .IP | |
387 | The default is to allow everything except \fBadmin\fR and \fBregister\fR | |
388 | (modified in legacy configurations by the obsolete \fBrestrict\fR directive). | |
389 | .TP | |
460b9539 | 390 | .B device \fINAME\fR |
bd8895a8 | 391 | Sound output device. |
392 | .IP | |
c0c23a60 RK |
393 | For \fBapi oss\fR this is the path to the device to use. |
394 | If it is set to \fBdefault\fR then \fI/dev/dsp\fR and \fI/dev/audio\fR | |
395 | will be tried. | |
bd8895a8 | 396 | .IP |
397 | For \fBapi alsa\fR this is the device name to use. | |
398 | .IP | |
399 | For \fBapi coreaudio\fR this is currently ignored. | |
400 | .IP | |
b25aac59 | 401 | The default is \fBdefault\fR, which is intended to map to whatever the system's |
402 | default is. | |
460b9539 | 403 | .TP |
404 | .B gap \fISECONDS\fR | |
c0c23a60 RK |
405 | Specifies the number of seconds to leave between tracks. |
406 | The default is 0. | |
49a773eb RK |
407 | .IP |
408 | NB this option currently DOES NOT WORK. If there is genuine demand it might be | |
409 | reinstated. | |
460b9539 | 410 | .TP |
411 | .B history \fIINTEGER\fR | |
412 | Specifies the number of recently played tracks to remember (including | |
413 | failed tracks and scratches). | |
414 | .TP | |
415 | .B listen \fR[\fIHOST\fR] \fISERVICE\fR | |
416 | Listen for connections on the address specified by \fIHOST\fR and port | |
c0c23a60 RK |
417 | specified by \fISERVICE\fR. |
418 | If \fIHOST\fR is omitted then listens on all local addresses. | |
460b9539 | 419 | .IP |
420 | Normally the server only listens on a UNIX domain socket. | |
421 | .TP | |
422 | .B lock yes\fR|\fBno | |
c0c23a60 RK |
423 | Determines whether the server locks against concurrent operation. |
424 | Default is \fByes\fR. | |
425 | There is no good reason to set this to \fBno\fR and the option will | |
25ca855b | 426 | probably be removed in a future version. |
460b9539 | 427 | .TP |
bd8895a8 | 428 | .B mixer \fIDEVICE\fR |
429 | The mixer device name, if it needs to be specified separately from | |
430 | \fBdevice\fR. | |
431 | .IP | |
432 | For \fBapi oss\fR this should be the path to the mixer device and the default | |
433 | is \fI/dev/mixer\fR. | |
434 | .IP | |
c0c23a60 RK |
435 | For \fBapi alsa\fR, this is the index of the mixer control to use. |
436 | The default is 0. | |
bd8895a8 | 437 | .IP |
438 | For \fBapi coreaudio\fR, volume setting is not currently supported. | |
460b9539 | 439 | .TP |
61941295 | 440 | .B multicast_loop yes\fR|\fBno |
c0c23a60 RK |
441 | Determines whether multicast packets are loop backed to the sending host. |
442 | The default is \fByes\fR. | |
443 | This only applies if \fBapi\fR is set to \fBnetwork\fR and \fBbroadcast\fR | |
444 | is actually a multicast address. | |
61941295 | 445 | .TP |
23205f9c | 446 | .B multicast_ttl \fIHOPS\fR |
c0c23a60 RK |
447 | Set the maximum number of hops to send multicast packets. |
448 | This only applies if \fBapi\fR is set to \fBnetwork\fR and | |
449 | \fBbroadcast\fR is actually a multicast address. | |
450 | The default is 1. | |
23205f9c | 451 | .TP |
460b9539 | 452 | .B namepart \fIPART\fR \fIREGEXP\fR \fISUBST\fR [\fICONTEXT\fR [\fIREFLAGS\fR]] |
453 | Determines how to extract trackname part \fIPART\fR from a | |
454 | track name (with the collection root part removed). | |
455 | Used in \fB@recent@\fR, \fB@playing@\fR and \fB@search@\fR. | |
456 | .IP | |
c0c23a60 RK |
457 | Track names can be different in different contexts. |
458 | For instance the sort string might include an initial track number, | |
459 | but this would be stripped for the display string. | |
460 | \fICONTEXT\fR should be a glob pattern matching the | |
460b9539 | 461 | contexts in which this directive will be used. |
462 | .IP | |
463 | Valid contexts are \fBsort\fR and \fBdisplay\fR. | |
464 | .IP | |
c0c23a60 RK |
465 | All the \fBnamepart\fR directives are considered in order. |
466 | The first directive for the right part, that matches the desired context, | |
460b9539 | 467 | and with a \fIREGEXP\fR that |
468 | matches the track is used, and the value chosen is constructed from | |
469 | \fISUBST\fR according to the substitution rules below. | |
470 | .IP | |
471 | Note that searches use the raw track name and \fBtrackname_\fR preferences but | |
472 | not (currently) the results of \fBnamepart\fR, so generating words via this option | |
473 | that aren't in the original track name will lead to confusing results. | |
474 | .IP | |
475 | If you supply no \fBnamepart\fR directives at all then a default set will be | |
c0c23a60 RK |
476 | supplied automatically. |
477 | But if you supply even one then you must supply all of them. | |
478 | The defaults are equivalent to: | |
25ca855b RK |
479 | .PP |
480 | .nf | |
481 | namepart title "/([0-9]+ *[-:] *)?([^/]+)\\.[a-zA-Z0-9]+$" $2 display | |
482 | namepart title "/([^/]+)\\.[a-zA-Z0-9]+$" $1 sort | |
483 | namepart album "/([^/]+)/[^/]+$" $1 * | |
484 | namepart artist "/([^/]+)/[^/]+/[^/]+$" $1 * | |
485 | namepart ext "(\\.[a-zA-Z0-9]+)$" $1 * | |
486 | .fi | |
460b9539 | 487 | .TP |
d742bb47 | 488 | .B new_max \fIMAX\fR |
c0c23a60 RK |
489 | The maximum number of tracks to list when reporting newly noticed tracks. |
490 | The default is 100. | |
d742bb47 | 491 | .TP |
460b9539 | 492 | .B nice_rescan \fIPRIORITY\fR |
c0c23a60 RK |
493 | Set the recan subprocess priority. |
494 | The default is 10. | |
460b9539 | 495 | .IP |
496 | (Note that higher values mean the process gets less CPU time; UNIX priority | |
04e42396 | 497 | values are backwards.) |
460b9539 | 498 | .TP |
499 | .B nice_server \fIPRIORITY\fR | |
c0c23a60 RK |
500 | Set the server priority. |
501 | This is applied to the server at startup time (and not when you reload | |
502 | configuration). | |
503 | The server does not use much CPU itself but this value is inherited | |
504 | by programs it executes. | |
505 | If you have limited CPU then it might help to set this to a small | |
506 | negative value. | |
507 | The default is 0. | |
460b9539 | 508 | .TP |
509 | .B nice_speaker \fIPRIORITY\fR | |
c0c23a60 RK |
510 | Set the speaker process priority. |
511 | This is applied to the speaker process at startup time (and not when | |
512 | you reload the configuration). | |
513 | The speaker process is not massively CPU intensive by today's | |
514 | standards but depends on reasonably timely scheduling. | |
515 | If you have limited CPU then it might help to set this to a small | |
516 | negative value. | |
517 | The default is 0. | |
460b9539 | 518 | .TP |
2a10b70b RK |
519 | .B noticed_history |
520 | The maximum days that a track can survive in the database of newly added | |
c0c23a60 RK |
521 | tracks. |
522 | The default is 31. | |
2a10b70b | 523 | .TP |
0d350ff0 | 524 | .B player \fIPATTERN\fR \fIMODULE\fR [\fIOPTIONS.. [\fB\-\-\fR]] \fIARGS\fR... |
c0c23a60 RK |
525 | Specifies the player for files matching the glob \fIPATTERN\fR. |
526 | \fIMODULE\fR specifies which plugin module to use. | |
460b9539 | 527 | .IP |
528 | The following options are supported: | |
529 | .RS | |
530 | .TP | |
0d350ff0 | 531 | .B \-\-wait\-for\-device\fR[\fB=\fIDEVICE\fR] |
460b9539 | 532 | Waits (for up to a couple of seconds) for the default, or specified, libao |
533 | device to become openable. | |
534 | .TP | |
0d350ff0 | 535 | .B \-\- |
c0c23a60 | 536 | Defines the end of the list of options. |
0d350ff0 | 537 | Needed if the first argument to the plugin starts with a "\-". |
460b9539 | 538 | .RE |
539 | .IP | |
540 | The following are the standard modules: | |
541 | .RS | |
542 | .TP | |
543 | .B exec \fICOMMAND\fR \fIARGS\fR... | |
544 | The command is executed via \fBexecvp\fR(3), not via the shell. | |
545 | The \fBPATH\fR environment variable is searched for the executable if it is not | |
546 | an absolute path. | |
547 | The command is expected to know how to open its own sound device. | |
548 | .TP | |
549 | .B execraw \fICOMMAND\fR \fIARGS\fR... | |
550 | Identical to the \fBexec\fR except that the player is expected to use the | |
ce6c36be | 551 | DisOrder raw player protocol. |
552 | .BR disorder-decode (8) | |
c0c23a60 RK |
553 | can decode several common audio file formats to this format. |
554 | If your favourite format is not supported, but you have a player | |
555 | which uses libao, there is also a libao driver which supports this format; | |
556 | see below for more information about this. | |
460b9539 | 557 | .TP |
558 | .B shell \fR[\fISHELL\fR] \fICOMMAND\fR | |
c0c23a60 RK |
559 | The command is executed using the shell. |
560 | If \fISHELL\fR is specified then that is used, otherwise \fBsh\fR will be used. | |
561 | In either case the \fBPATH\fR environment variable is searched for the shell | |
562 | executable if it is not an absolute path. | |
563 | The track name is stored in the environment variable | |
460b9539 | 564 | \fBTRACK\fR. |
565 | .IP | |
566 | Be careful of the interaction between the configuration file quoting rules and | |
567 | the shell quoting rules. | |
568 | .RE | |
569 | .IP | |
570 | If multiple player commands match a track then the first match is used. | |
62dc3748 RK |
571 | .IP |
572 | For the server to be able to calculate track lengths, there should be a | |
573 | .B tracklength | |
574 | command corresponding to each | |
575 | .B player | |
576 | command. | |
40c30921 RK |
577 | .IP |
578 | If | |
579 | .B player | |
580 | is used without arguments, the list of players is cleared. | |
460b9539 | 581 | .TP |
582 | .B prefsync \fISECONDS\fR | |
c0c23a60 RK |
583 | The interval at which the preferences log file will be synchronised. |
584 | Defaults to 3600, i.e. one hour. | |
460b9539 | 585 | .TP |
459d4402 | 586 | .B queue_pad \fICOUNT\fR |
c0c23a60 RK |
587 | The target size of the queue. |
588 | If random play is enabled then randomly picked tracks will be added until | |
589 | the queue is at least this big. | |
590 | The default is 10. | |
459d4402 | 591 | .TP |
6207d2f3 | 592 | .B reminder_interval \fISECONDS\fR |
c0c23a60 RK |
593 | The minimum number of seconds that must elapse between password reminders. |
594 | The default is 600, i.e. 10 minutes. | |
6207d2f3 | 595 | .TP |
cebe3127 RK |
596 | .B replay_min \fISECONDS\fR |
597 | The minimum number of seconds that must elapse after a track has been played | |
598 | before it can be picked at random. The default is 8 hours. If this is set to | |
599 | 0 then there is no limit, though current \fBdisorder-choose\fR will not pick | |
600 | anything currently listed in the recently-played list. | |
601 | .TP | |
405fea4e | 602 | .B sample_format \fIBITS\fB/\fIRATE\fB/\fICHANNELS |
c0c23a60 RK |
603 | Describes the sample format expected by the \fBspeaker_command\fR (below). |
604 | The components of the format specification are as follows: | |
405fea4e | 605 | .RS |
606 | .TP 10 | |
607 | .I BITS | |
c0c23a60 RK |
608 | The number of bits per sample. |
609 | Optionally, may be suffixed by \fBb\fR or \fBl\fR for big-endian and | |
610 | little-endian words. | |
611 | If neither is used the native byte order is assumed. | |
405fea4e | 612 | .TP |
613 | .I RATE | |
614 | The number of samples per second. | |
615 | .TP | |
616 | .I CHANNELS | |
617 | The number of channels. | |
618 | .PP | |
619 | The default is | |
620 | .BR 16/44100/2 . | |
937be4c0 RK |
621 | .PP |
622 | With the | |
623 | .B network | |
624 | backend the sample format is forced to | |
e99d42b1 | 625 | .B 16b/44100/2 |
937be4c0 RK |
626 | and with the |
627 | .B coreaudio | |
628 | backend it is forced to | |
629 | .BR 16/44100/2 , | |
630 | in both cases regardless of what is specified in the configuration file. | |
405fea4e | 631 | .RE |
632 | .TP | |
460b9539 | 633 | .B signal \fINAME\fR |
634 | Defines the signal to be sent to track player process groups when tracks are | |
c0c23a60 RK |
635 | scratched. |
636 | The default is \fBSIGKILL\fR. | |
460b9539 | 637 | .IP |
638 | Signals are specified by their full C name, i.e. \fBSIGINT\fR and not \fBINT\fR | |
639 | or \fBInterrupted\fR or whatever. | |
640 | .TP | |
5330d674 | 641 | .B sox_generation \fB0\fR|\fB1 |
0d350ff0 RK |
642 | Determines whether calls to \fBsox\fR(1) should use \fB\-b\fR, \fB\-x\fR, etc (if |
643 | the generation is 0) or \fB\-\fIbits\fR, \fB\-L\fR etc (if it is 1). | |
c0c23a60 RK |
644 | See the documentation for your installed copy of \fBsox\fR to determine |
645 | which you need. | |
25ca855b | 646 | The default is 0. |
5330d674 | 647 | .TP |
bd8895a8 | 648 | .B speaker_backend \fINAME |
649 | This is an alias for \fBapi\fR; see above. | |
650 | .TP | |
405fea4e | 651 | .B speaker_command \fICOMMAND |
652 | Causes the speaker subprocess to pipe audio data into shell command | |
c0c23a60 RK |
653 | \fICOMMAND\fR, rather than writing to a local sound card. |
654 | The sample format is determine by | |
405fea4e | 655 | .B sample_format |
656 | above. | |
77cfc7a2 | 657 | .IP |
658 | Note that if the sample format is wrong then | |
659 | .BR sox (1) | |
c0c23a60 RK |
660 | is invoked to translate it. |
661 | If | |
77cfc7a2 | 662 | .B sox |
663 | is not installed then this will not work. | |
405fea4e | 664 | .TP |
460b9539 | 665 | .B scratch \fIPATH\fR |
c0c23a60 RK |
666 | Specifies a scratch. |
667 | When a track is scratched, a scratch track is played at random. | |
460b9539 | 668 | Scratches are played using the same logic as other tracks. |
669 | .IP | |
670 | At least for the time being, path names of scratches must be encoded using | |
671 | UTF-8 (which means that ASCII will do). | |
40c30921 RK |
672 | .IP |
673 | If \fBscratch\fR is used without arguments then the list of scratches is | |
674 | cleared. | |
460b9539 | 675 | .TP |
676 | .B stopword \fIWORD\fR ... | |
677 | Specifies one or more stopwords that should not take part in searches | |
678 | over track names. | |
40c30921 RK |
679 | .IP |
680 | If \fBstopword\fR is used without arguments then the list of stopwords is | |
681 | cleared. | |
86be0c30 | 682 | .IP |
683 | There is a default set of stopwords built in, but this option can be used to | |
684 | augment or replace that list. | |
62dc3748 RK |
685 | .TP |
686 | .B tracklength \fIPATTERN\fR \fIMODULE\fR | |
687 | Specifies the module used to calculate the length of files matching | |
c0c23a60 RK |
688 | \fIPATTERN\fR. |
689 | \fIMODULE\fR specifies which plugin module to use. | |
40c30921 RK |
690 | .IP |
691 | If \fBtracklength\fR is used without arguments then the list of modules is | |
692 | cleared. | |
eb5dc014 | 693 | .TP |
90ad6c6e | 694 | .B user \fIUSERNAME\fR |
c0c23a60 RK |
695 | Specifies the user to run as. |
696 | Only makes sense if invoked as root (or the target user). | |
460b9539 | 697 | .SS "Client Configuration" |
698 | .TP | |
ccf0aafa | 699 | .B connect \fIHOST SERVICE\fR |
460b9539 | 700 | Connect to the address specified by \fIHOST\fR and port specified by |
ccf0aafa | 701 | \fISERVICE\fR. |
460b9539 | 702 | .SS "Web Interface Configuration" |
703 | .TP | |
e70701e7 | 704 | .B mail_sender \fIADDRESS\fR |
705 | The email address that appears in the From: field of any mail messages sent by | |
c0c23a60 RK |
706 | the web interface. |
707 | This must be set if you have online registration enabled. | |
e70701e7 | 708 | .TP |
460b9539 | 709 | .B refresh \fISECONDS\fR |
c0c23a60 RK |
710 | Specifies the maximum refresh period in seconds. |
711 | Default 15. | |
460b9539 | 712 | .TP |
61507e3c RK |
713 | .B short_display \fICHARACTERS\fR |
714 | Defines the maximum number of characters to include in a \fBshort\fR name | |
c0c23a60 RK |
715 | part. |
716 | Default 30. | |
61507e3c | 717 | .TP |
e70701e7 | 718 | .B smtp_server \fIHOSTNAME\fR |
c0c23a60 RK |
719 | The hostname (or address) of the SMTP server to use for sending mail. |
720 | The default is 127.0.0.1. | |
e70701e7 | 721 | .TP |
460b9539 | 722 | .B templates \fIPATH\fR ... |
723 | Specifies the directory containing templates used by the web | |
c0c23a60 RK |
724 | interface. |
725 | If a template appears in more than one template directory | |
460b9539 | 726 | then the one in the earliest directory specified is chosen. |
727 | .IP | |
728 | See below for further details. | |
40c30921 RK |
729 | .IP |
730 | If \fBtemplates\fR is used without arguments then the template path is cleared. | |
460b9539 | 731 | .TP |
732 | .B transform \fITYPE\fR \fIREGEXP\fR \fISUBST\fR [\fICONTEXT\fR [\fIREFLAGS\fR]] | |
733 | Determines how names are sorted and displayed in track choice displays. | |
734 | .IP | |
735 | \fITYPE\fR is the type of transformation; usually \fBtrack\fR or | |
736 | \fBdir\fR but you can define your own. | |
737 | .IP | |
c0c23a60 RK |
738 | \fICONTEXT\fR is a glob pattern matching the context. |
739 | Standard contexts are \fBsort\fR (which determines how directory names | |
740 | are sorted) and \fBdisplay\fR (which determines how they are displayed). | |
741 | Again, you can define your own. | |
460b9539 | 742 | .IP |
c0c23a60 RK |
743 | All the \fBtransform\fR directives are considered in order. |
744 | If the \fITYPE\fR, \fIREGEXP\fR and the \fICONTEXT\fR match | |
460b9539 | 745 | then a new track name is constructed from |
c0c23a60 RK |
746 | \fISUBST\fR according to the substitution rules below. |
747 | If several match then each is executed in order. | |
460b9539 | 748 | .IP |
749 | If you supply no \fBtransform\fR directives at all then a default set will be | |
c0c23a60 RK |
750 | supplied automatically. |
751 | But if you supply even one then you must supply all of them. | |
752 | The defaults are: | |
25ca855b RK |
753 | .PP |
754 | .nf | |
755 | transform track "^.*/([0-9]+ *[-:] *)?([^/]+)\\.[a-zA-Z0-9]+$" $2 display | |
756 | transform track "^.*/([^/]+)\\.[a-zA-Z0-9]+$" $1 sort | |
757 | transform dir "^.*/([^/]+)$" $1 * | |
758 | transform dir "^(the) ([^/]*)" "$2 $1" sort i | |
759 | transform dir "[[:punct:]]" "" sort g | |
760 | .fi | |
460b9539 | 761 | .TP |
762 | .B url \fIURL\fR | |
c0c23a60 RK |
763 | Specifies the URL of the web interface. |
764 | This URL will be used in generated web pages. | |
765 | The default is inferred at runtime, so this option no | |
b64c2805 | 766 | longer needs to be specified. |
460b9539 | 767 | .IP |
768 | This must be the full URL, e.g. \fBhttp://myhost/cgi-bin/jukebox\fR and not | |
769 | \fB/cgi-bin/jukebox\fR. | |
770 | .SS "Authentication Configuration" | |
90ad6c6e RK |
771 | These options would normally be used in \fI~\fRUSERNAME\fI/.disorder/passwd\fR |
772 | or | |
773 | \fIpkgconfdir/config.\fRUSERNAME. | |
460b9539 | 774 | .TP |
460b9539 | 775 | .B password \fIPASSWORD\fR |
776 | Specify password. | |
777 | .TP | |
460b9539 | 778 | .B username \fIUSERNAME\fR |
c0c23a60 RK |
779 | Specify username. |
780 | The default is taken from the environment variable \fBLOGNAME\fR. | |
460b9539 | 781 | .SH "GLOBAL PREFERENCES" |
0d350ff0 | 782 | These are the values set with \fBset\-global\fR. |
460b9539 | 783 | .TP |
0d350ff0 | 784 | .B required\-tags |
460b9539 | 785 | If this is set an nonempty then randomly played tracks will always have at |
786 | least one of the listed tags. | |
460b9539 | 787 | .TP |
0d350ff0 | 788 | .B prohibited\-tags |
460b9539 | 789 | If this is set an nonempty then randomly played tracks will never have any of |
790 | the listed tags. | |
791 | .TP | |
792 | .B playing | |
c0c23a60 RK |
793 | If unset or \fByes\fR then play is enabled. |
794 | Otherwise it is disabled. | |
795 | Use \fBdisable\fR rather than setting it directly. | |
460b9539 | 796 | .TP |
0d350ff0 | 797 | .B random\-play |
c0c23a60 RK |
798 | If unset or \fByes\fR then random play is enabled. |
799 | Otherwise it is disabled. | |
460b9539 | 800 | Use \fBdisable\fR rather than setting it directly. |
f9635e06 RK |
801 | .PP |
802 | Global preferences starting '_' are read-only (in the sense that you cannot | |
c0c23a60 RK |
803 | modify them; the server may modify them as part of its normal operation). |
804 | They are: | |
f9635e06 RK |
805 | .TP |
806 | .B _dbversion | |
c0c23a60 RK |
807 | The database version string. |
808 | This is used by DisOrder to detect when it must | |
f9635e06 | 809 | modify the database after an upgrade. |
460b9539 | 810 | .SH "LIBAO DRIVER" |
811 | .SS "Raw Protocol Players" | |
812 | Raw protocol players are expected to use the \fBdisorder\fR libao driver. | |
813 | Programs that use libao generally have command line options to select the | |
814 | driver and pass options to it. | |
815 | .SS "Driver Options" | |
816 | The known driver options are: | |
817 | .TP | |
818 | .B fd | |
c0c23a60 RK |
819 | The file descriptor to write to. |
820 | If this is not specified then the driver looks like the environment | |
821 | variable \fBDISORDER_RAW_FD\fR. | |
822 | If that is not set then the default is 1 (i.e. standard output). | |
460b9539 | 823 | .TP |
824 | .B fragile | |
825 | If this is set to a nonzero value then the driver will call \fB_exit\fR(2) if a | |
c0c23a60 RK |
826 | write to the output file descriptor fails. |
827 | This is a workaround for buggy players such as \fBogg123\fR that ignore | |
828 | write errors. | |
460b9539 | 829 | .SH "WEB TEMPLATES" |
830 | When \fBdisorder.cgi\fR wants to generate a page for an action it searches the | |
c0c23a60 RK |
831 | directories specified with \fBtemplates\fR for a matching file. |
832 | It is suggested that you leave the distributed templates unchanged and put | |
460b9539 | 833 | any customisations in an earlier entry in the template path. |
834 | .PP | |
835 | The supplied templates are: | |
836 | .TP | |
837 | .B about.html | |
838 | Display information about DisOrder. | |
839 | .TP | |
840 | .B choose.html | |
c0c23a60 RK |
841 | Navigates through the track database to choose a track to play. |
842 | The \fBdir\fR argument gives the directory to look in; if it is missing | |
460b9539 | 843 | then the root directory is used. |
844 | .TP | |
845 | .B choosealpha.html | |
846 | Provides a front end to \fBchoose.html\fR which allows subsets of the top level | |
847 | directories to be selected by initial letter. | |
848 | .TP | |
d5b6ffd7 RK |
849 | .B new.html |
850 | Lists newly added tracks. | |
851 | .TP | |
460b9539 | 852 | .B playing.html |
853 | The "front page", which usually shows the currently playing tracks and | |
854 | the queue. | |
855 | Gets an HTTP \fBRefresh\fR header. | |
856 | .IP | |
857 | If the \fBmgmt\fR CGI argument is set to \fBtrue\fR then we include extra | |
c0c23a60 RK |
858 | buttons for moving tracks up and down in the queue. |
859 | There is some logic in \fBdisorder.cgi\fR to ensure that \fBmgmt=true\fR | |
860 | is preserved across refreshes and redirects back into itself, but | |
861 | URLs embedded in web pages must include it explicitly. | |
460b9539 | 862 | .TP |
863 | .B prefs.html | |
c0c23a60 RK |
864 | Views preferences. |
865 | If the \fBfile\fR, \fBname\fR and \fBvalue\fR arguments are | |
460b9539 | 866 | all set then that preference is modified; if \fBfile\fR and \fBname\fR are set |
867 | but not \fBvalue\fR then the preference is deleted. | |
868 | .TP | |
869 | .B recent.html | |
870 | Lists recently played tracks. | |
871 | .TP | |
872 | .B search.html | |
873 | Presents search results. | |
874 | .TP | |
875 | .B volume.html | |
876 | Primitive volume control. | |
877 | .PP | |
878 | Additionally, other standard files are included by these: | |
879 | .TP | |
880 | .B credits.html | |
881 | Included at the end of the main content \fB<DIV>\fR element. | |
882 | .TP | |
d5b6ffd7 | 883 | .B topbar.html |
e12da4d9 | 884 | Included at the start of the \fB<BODY>\fR element. |
885 | .TP | |
886 | .B topbarend.html | |
887 | Included at the end of the \fB<BODY>\fR element. | |
460b9539 | 888 | .TP |
889 | .B stdhead.html | |
890 | Included in the \fB<HEAD>\fR element. | |
891 | .TP | |
892 | .B stylesheet.html | |
c0c23a60 RK |
893 | Contains the default DisOrder stylesheet. |
894 | You can override this by editing the CSS or by replacing it all with | |
895 | a \fB<LINK>\fR to an external stylesheet. | |
460b9539 | 896 | .PP |
897 | Templates are ASCII files containing HTML documents, with an expansion | |
898 | syntax to enable data supplied by the implementation to be inserted. | |
899 | .PP | |
900 | If you want to use characters outside the ASCII range, use either the | |
901 | appropriate HTML entity, e.g. \fBé\fR, or an SGML numeric | |
c0c23a60 RK |
902 | character reference, e.g. \fBý\fR. |
903 | Use \fB@\fR to insert a literal \fB@\fR without falling foul of | |
904 | the expansion syntax. | |
460b9539 | 905 | .SS "Expansion Syntax" |
906 | Expansions are surrounded by at ("@") symbols take the form of a keyword | |
c0c23a60 RK |
907 | followed by zero or more arguments. |
908 | Arguments may either be quoted by curly brackets ("{" and "}") or separated | |
909 | by colons (":"). | |
910 | Both kinds may be mixed in a single expansion, though doing so seems | |
911 | likely to cause confusion. | |
912 | The descriptions below contain suggested forms for each expansion. | |
460b9539 | 913 | .PP |
914 | Leading and trailing whitespace in unquoted arguments is ignored, as is | |
915 | whitespace (including newlines) following a close bracket ("}"). | |
916 | .PP | |
917 | Arguments are recursively expanded before being interpreted, except for | |
c0c23a60 RK |
918 | \fITEMPLATE\fR arguments. |
919 | These are expanded (possibly more than once) to produce the final expansion. | |
460b9539 | 920 | (More than once means the same argument being expanded more than once |
921 | for different tracks or whatever, not the result of the first | |
922 | expansion itself being re-expanded.) | |
923 | .PP | |
924 | Strings constructed by expansions (i.e. not literally copied from the template | |
925 | text) are SGML-quoted: any character which does not stand for itself in #PCDATA | |
926 | or a quoted attribute value is replaced by the appropriate numeric character | |
927 | reference. | |
928 | .PP | |
929 | The exception to this is that such strings are \fInot\fR quoted when they are | |
930 | generated in the expansion of a parameter. | |
931 | .PP | |
932 | In the descriptions below, the current track means the one set by | |
933 | \fB@playing@\fR, \fB@recent@\fR or \fB@queue@\fR, not the one that is playing. | |
934 | If none of these expansions are in force then there is no current track. | |
935 | \fIBOOL\fR should always be either \fBtrue\fR or \fBfalse\fR. | |
936 | .SS "Expansions" | |
937 | The following expansion keywords are defined: | |
938 | .TP | |
939 | .B @#{\fICOMMENT\fB}@ | |
940 | Ignored. | |
941 | .TP | |
942 | .B @action@ | |
c0c23a60 RK |
943 | The current action. |
944 | This reports | |
460b9539 | 945 | .B manage |
946 | if the action is really | |
947 | .B playing | |
948 | but | |
949 | .B mgmt=true | |
950 | was set. | |
951 | .TP | |
952 | .B @and{\fIBOOL\fB}{\fIBOOL\fB}\fR...\fB@ | |
953 | If there are no arguments, or all the arguments are \fBtrue\fB, then expands to | |
954 | \fBtrue\fR, otherwise to \fBfalse\fR. | |
955 | .TP | |
956 | .B @arg:\fINAME\fB@ | |
25ca855b | 957 | Expands to the value of CGI argument \fINAME\fR. |
460b9539 | 958 | .TP |
959 | .B @basename@ | |
960 | The basename of the current directory component, in \fB@navigate@\fR. | |
961 | .TP | |
962 | .B @basename{\fIPATH\fB}@ | |
963 | The base name part of \fIPATH\fR. | |
964 | .TP | |
965 | .B @choose{\fIWHAT\fB}{\fITEMPLATE\fB}@ | |
966 | Expands \fITEMPLATE\fR repeatedly for each file or directory under | |
967 | \fB@arg:directory@\fR. | |
968 | \fIWHAT\fR should be either \fBfile\fR or \fBdirectory\fR. | |
969 | Use \fB@file@\fR to get the display name or filename of the file or | |
970 | directory. | |
971 | Usually used in \fBchoose.html\fR. | |
972 | .TP | |
973 | .B @dirname@ | |
974 | The directory of the current directory component, in \fB@navigate@\fR. | |
975 | .TP | |
976 | .B @dirname{\fIPATH\fB}@ | |
977 | The directory part of \fIPATH\fR. | |
978 | .TP | |
979 | .B @enabled@ | |
980 | Expands to \fBtrue\fR if play is currently enabled, otherwise to \fBfalse\fR. | |
981 | .TP | |
982 | .B @eq{\fIA\fB}{\fIB\fB} | |
983 | Expands to \fBtrue\fR if \fIA\fR and \fIB\fR are identical, otherwise to | |
984 | \fBfalse\fR. | |
985 | .TP | |
986 | .B @file@ | |
987 | Expands to the filename of the current file or directory, inside the template | |
988 | argument to \fBchoose\fR. | |
989 | .TP | |
990 | .B @files{\fITEMPLATE\fB} | |
40c30921 | 991 | Expands \fITEMPLATE\fR once for each file indicated by the \fBdirectory\fR CGI |
460b9539 | 992 | arg if it is present, or otherwise for the list of files counted by \fBfiles\fR |
993 | with names \fB0_file\fR, \fB1_file\fR etc. | |
994 | .TP | |
995 | .B @fullname@ | |
996 | The full path of the current directory component, in \fB@navigate@\fR. | |
997 | .TP | |
998 | .B @id@ | |
999 | The ID of the current track. | |
1000 | .TP | |
1001 | .B @if{\fIBOOL\fB}{\fITRUEPART\fB}{\fIFALSEPART\fB}@ | |
1002 | If \fIBOOL\fR expands to \fBtrue\fR then expands to \fITRUEPART\fR, otherwise | |
1003 | to \fIFALSEPART\fR (which may be omitted). | |
1004 | .TP | |
8f9616f1 RK |
1005 | .B @image:\fINAME\fB@ |
1006 | Expands to the (possibly relative) URL for image \fINAME\fR. | |
1007 | .IP | |
1008 | If there is a label \fBimages.\fINAME\fR then that will be the image base name. | |
1009 | Otherwise the image base name is \fINAME\fB.png\fR or just \fINAME\fR if it | |
c0c23a60 RK |
1010 | alraedy has an extension. |
1011 | Thus labels may be defined to give images role names. | |
8f9616f1 | 1012 | .IP |
c0c23a60 RK |
1013 | If there is a label \fBurl.static\fR then that is the base URL for images. |
1014 | If it is not defined then \fB/disorder\fR is used as a default. | |
8f9616f1 RK |
1015 | .TP |
1016 | .B @include:\fIPATH\fB@ | |
c0c23a60 RK |
1017 | Include the named file as if it were a template file. |
1018 | If \fIPATH\fR starts with a \fB/\fR then it is used as-is; | |
1019 | otherwise, ".html" is appended and the template path is searched. | |
460b9539 | 1020 | .TP |
1021 | .B @index@ | |
1022 | Expands to the index of the current file in \fB@queue@\fR, \fB@recent@\fR or | |
1023 | \fB@files@\fR. | |
1024 | .TP | |
1025 | .B @isdirectories@ | |
1026 | Expands to \fBtrue\fR if there are any directories in \fB@arg:directory@\fR, | |
1027 | otherwise to \fBfalse\fR. | |
1028 | .TP | |
1029 | .B @isfiles@ | |
1030 | Expands to \fBtrue\fR if there are any files in \fB@arg:directory@\fR, | |
1031 | otherwise to \fBfalse\fR. | |
1032 | .TP | |
1033 | .B @isfirst@ | |
1034 | Expands to \fBtrue\fR if this is the first repetition of a \fITEMPLATE\fR | |
1035 | argument in a loop (\fB@queue\fR or similar), otherwise to \fBfalse\fR. | |
1036 | .TP | |
1037 | .B @islast@ | |
1038 | Expands to \fBtrue\fR if this is the last repetition of a \fITEMPLATE\fR in a | |
1039 | loop, otherwise to \fBfalse\fR. | |
1040 | .TP | |
d5b6ffd7 RK |
1041 | .B @isnew@ |
1042 | Expands to \fBtrue\fR if the newly added tracks list has any tracks in it, | |
1043 | otherwise to \fBfalse\fR. | |
1044 | .TP | |
460b9539 | 1045 | .B @isplaying@ |
1046 | Expands to \fBtrue\fR if a track is playing, otherwise to \fBfalse\fR. | |
1047 | .TP | |
1048 | .B @isqueue@ | |
1049 | Expands to \fBtrue\fR if there are any tracks in the queue, otherwise to | |
1050 | \fBfalse\fR. | |
1051 | .TP | |
1052 | .B @isrecent@ | |
1053 | Expands to \fBtrue\fR if the recently played list has any tracks in it, | |
1054 | otherwise to \fBfalse\fR. | |
1055 | .TP | |
1056 | .B @label:\fINAME\fR\fB@ | |
c0c23a60 RK |
1057 | Expands to the value of label \fINAME\fR. |
1058 | See the shipped \fIoptions.labels\fR file for full documentation of the | |
1059 | labels used by the standard templates. | |
460b9539 | 1060 | .TP |
1061 | .B @length@ | |
1062 | Expands to the length of the current track. | |
1063 | .TP | |
938d8157 | 1064 | .B @movable@ |
1065 | Expands to \fBtrue\fR if the current track is movable, otherwise to | |
1066 | \fBfalse\fR. | |
1067 | .TP | |
460b9539 | 1068 | .B @navigate{\fIDIRECTORY\fB}{\fITEMPLATE\fB} |
1069 | Expands \fITEMPLATE\fR for each component of \fIDIRECTORY\fR in turn. | |
1070 | Use \fB@dirname\fR and \fB@basename@\fR to get the components of the path to | |
1071 | each component. | |
1072 | Usually used in \fBchoose.html\fR. | |
1073 | .TP | |
1074 | .B @ne{\fIA\fB}{\fIB\fB} | |
1075 | Expands to \fBtrue\fR if \fIA\fR and \fIB\fR differ, otherwise to \fBfalse\fR. | |
1076 | .TP | |
d5b6ffd7 RK |
1077 | .B @new{\fITEMPLATE\fB} |
1078 | Expands \fITEMPLATE\fR for each track in the newly added tracks list, starting | |
c0c23a60 RK |
1079 | with the most recent. |
1080 | Used in \fBnew.html\fR. | |
d5b6ffd7 | 1081 | .TP |
460b9539 | 1082 | .B @nfiles@ |
1083 | Expands to the number of files from \fB@files\fR (above). | |
1084 | .TP | |
1085 | .B @nonce@ | |
1086 | Expands to a string including the time and process ID, intended to be | |
1087 | unique across invocations. | |
1088 | .TP | |
1089 | .B @not{\fIBOOL\fB}@ | |
1090 | Expands to \fBfalse\fR if \fIBOOL\fR is \fBtrue\fR, otherwise to | |
1091 | \fBfalse\fR. | |
1092 | .TP | |
1093 | .B @or{\fIBOOL\fB}{\fIBOOL\fB}\fR...\fB@ | |
1094 | If at least one argument is \fBtrue\fB, then expands to \fBtrue\fR, otherwise | |
1095 | to \fBfalse\fR. | |
1096 | .TP | |
1097 | .B @parity@ | |
1098 | Expands to \fBeven\fR or \fBodd\fR depending on whether the current track is at | |
1099 | an even or odd position in \fB@queue@\fR, \fB@recent@\fR or \fB@files@\fR. | |
1100 | .TP | |
1101 | .B @part{\fICONTEXT\fB}{\fIPART\fB}@ | |
1102 | Expands to track name part \fIPART\fR using context \fICONTEXT\fR for the | |
c0c23a60 RK |
1103 | current track. |
1104 | The context may be omitted and defaults to \fBdisplay\fR. | |
61507e3c RK |
1105 | .IP |
1106 | The special context \fBshort\fR is equivalent to \fBdisplay\fR but limited to | |
1107 | the \fBshort_display\fR limit. | |
460b9539 | 1108 | .TP |
1109 | .B @part{\fICONTEXT\fB}{\fIPART\fB}{\fITRACK\fB}@ | |
1110 | Expands to track name part \fIPART\fR using context \fICONTEXT\fR for | |
c0c23a60 RK |
1111 | \fITRACK\fR. |
1112 | In this usage the context may not be omitted. | |
61507e3c RK |
1113 | .IP |
1114 | The special context \fBshort\fR is equivalent to \fBdisplay\fR but limited to | |
1115 | the \fBshort_display\fR limit. | |
460b9539 | 1116 | .TP |
1117 | .B @paused@ | |
1118 | Expands to \fBtrue\fR if the current track is paused, else \fBfalse\fR. | |
1119 | .TP | |
1120 | .B @playing{\fITEMPLATE\fB}@ | |
1121 | Expands \fITEMPLATE\fR using the playing track as the current track. | |
1122 | .TP | |
1123 | .B @pref{\fITRACK\fB}{\fIKEY\fB}@ | |
1124 | Expand to the track preference, or the empty string if it is not set. | |
1125 | .TP | |
1126 | .B @prefname@ | |
1127 | Expands to the name of the current preference, in the template | |
1128 | argument of \fB@prefs@\fR. | |
1129 | .TP | |
1130 | .B @prefs{\fIFILE\fB}{\fITEMPLATE\fB}@ | |
1131 | Expands \fITEMPLATE\fR repeatedly, for each preference of track | |
1132 | \fIFILE\fR. | |
1133 | Use \fB@prefname@\fR and \fB@prefvalue@\fR to get the name and value. | |
1134 | .TP | |
1135 | .B @prefvalue@ | |
1136 | Expands to the value of the current preference, in the template | |
1137 | argument of \fB@prefs@\fR. | |
1138 | .TP | |
1139 | .B @queue{\fITEMPLATE\fB}@ | |
1140 | Expands \fITEMPLATE\fR repeatedly using the each track on the queue in turn as | |
c0c23a60 RK |
1141 | the current track. |
1142 | The track at the head of the queue comes first. | |
460b9539 | 1143 | .TP |
0d350ff0 | 1144 | .B @random\-enabled@ |
460b9539 | 1145 | Expands to \fBtrue\fR if random play is currently enabled, otherwise to |
1146 | \fBfalse\fR. | |
1147 | .TP | |
1148 | .B @recent{\fITEMPLATE\fB}@ | |
1149 | Expands \fITEMPLATE\fR repeatedly using the each recently played track in turn | |
c0c23a60 RK |
1150 | as the current track. |
1151 | The most recently played track comes first. | |
460b9539 | 1152 | .TP |
938d8157 | 1153 | .B @removable@ |
1154 | Expands to \fBtrue\fR if the current track is removable, otherwise to | |
1155 | \fBfalse\fR. | |
1156 | .TP | |
460b9539 | 1157 | .B @resolve{\fITRACK\fB}@ |
1158 | Resolve aliases for \fITRACK\fR and expands to the result. | |
1159 | .TP | |
938d8157 | 1160 | .B @right{\fIRIGHT\fB}@ |
1161 | Exapnds to \fBtrue\fR if the user has right \fIRIGHT\fR, otherwise to | |
1162 | \fBfalse\fR. | |
1163 | .TP | |
1164 | .B @right{\fIRIGHT\fB}{\fITRUEPART\fB}{\fIFALSEPART\fB}@ | |
1165 | Expands to \fITRUEPART\fR if the user right \fIRIGHT\fR, otherwise to | |
1166 | \fIFALSEPART\fR (which may be omitted). | |
1167 | .TP | |
1168 | .B @scratchable@ | |
1169 | Expands to \fBtrue\fR if the currently playing track is scratchable, otherwise | |
1170 | to \fBfalse\fR. | |
1171 | .TP | |
460b9539 | 1172 | .B @search{\fIPART\fB}\fR[\fB{\fICONTEXT\fB}\fR]\fB{\fITEMPLATE\fB}@ |
1173 | Expands \fITEMPLATE\fR once for each group of search results that have | |
1174 | a common value of track part \fIPART\fR. | |
1175 | The groups are sorted by the value of the part. | |
1176 | .IP | |
1177 | .B @part@ | |
1178 | and | |
1179 | .B @file@ | |
1180 | within the template will apply to one of the tracks in the group. | |
1181 | .IP | |
1182 | If \fICONTEXT\fR is specified it should be either \fBsort\fR or \fBdisplay\fR, | |
c0c23a60 RK |
1183 | and determines the context for \fIPART\fR. |
1184 | The default is \fBsort\fR. | |
1185 | Usually you want \fBdisplay\fR for everything except the title and | |
1186 | \fBsort\fR for the title. | |
1187 | If you use \fBsort\fR for artist and album then you are likely to get | |
460b9539 | 1188 | strange effects. |
1189 | .TP | |
0d350ff0 | 1190 | .B @server\-version@ |
460b9539 | 1191 | Expands to the server's version string. |
1192 | .TP | |
1193 | .B @shell{\fICOMMAND\fB}@ | |
c0c23a60 RK |
1194 | Expands to the output of \fICOMMAND\fR executed via the shell. |
1195 | \fBsh\fR is searched for using \fBPATH\fR. | |
1196 | If the command fails then this is logged but otherwise ignored. | |
460b9539 | 1197 | .TP |
1198 | .B @state@ | |
1199 | In \fB@queue@\fR and \fB@recent@\fR, expands to the state of the current | |
c0c23a60 RK |
1200 | track. |
1201 | Otherwise the empty string. | |
1202 | Known states are: | |
460b9539 | 1203 | .RS |
1204 | .TP 12 | |
1205 | .B failed | |
1206 | The player terminated with nonzero status, but not because the track was | |
1207 | scratched. | |
1208 | .TP | |
1209 | .B isscratch | |
1210 | A scratch, in the queue. | |
1211 | .TP | |
1212 | .B no_player | |
1213 | No player could be found. | |
1214 | .TP | |
1215 | .B ok | |
1216 | Played successfully. | |
1217 | .TP | |
1218 | .B random | |
1219 | A randomly chosen track, in the queue. | |
1220 | .TP | |
1221 | .B scratched | |
1222 | This track was scratched. | |
1223 | .TP | |
1224 | .B unplayed | |
1225 | An explicitly queued track, in the queue. | |
1226 | .RE | |
1227 | .IP | |
1228 | Some additional states only apply to playing tracks, so will never be seen in | |
1229 | the queue or recently-played list: | |
1230 | .RS | |
1231 | .TP 12 | |
1232 | .B paused | |
1233 | The track has been paused. | |
1234 | .TP | |
1235 | .B quitting | |
1236 | Interrupted because the server is shutting down. | |
1237 | .TP | |
1238 | .B started | |
1239 | This track is currently playing. | |
1240 | .RE | |
1241 | .TP | |
1242 | .B @stats@ | |
1243 | Expands to the server statistics. | |
1244 | .TP | |
1245 | .B @thisurl@ | |
c0c23a60 RK |
1246 | Expands to the URL of the current page. |
1247 | Typically used in | |
460b9539 | 1248 | .B back |
c0c23a60 RK |
1249 | arguments. |
1250 | If there is a | |
460b9539 | 1251 | .B nonce |
1252 | argument then it is changed to a fresh value. | |
1253 | .TP | |
1254 | .B @track@ | |
1255 | The current track. | |
1256 | .TP | |
1257 | .B @trackstate{\fIPATH\fB}@ | |
1258 | Expands to the current track state: \fBplaying\fR if the track is actually | |
1259 | playing now, \fBqueued\fR if it is queued or the empty string otherwise. | |
1260 | .TP | |
1261 | .B @transform{\fIPATH\fB}{\fITYPE\fB}{\fICONTEXT\fB}@ | |
1262 | Transform a path according to \fBtransform\fR (see above). | |
1263 | \fIPATH\fR should be a raw filename (of a track or directory). | |
1264 | \fITYPE\fR should be the transform type (e.g. \fItrack\fR or \fIdir\fR). | |
1265 | \fICONTEXT\fR should be the context, and can be omitted (the default | |
1266 | is \fBdisplay\fR). | |
1267 | .TP | |
1268 | .B @url@ | |
1269 | Expands to the canonical URL as defined in \fIpkgconfdir/config\fR. | |
1270 | .TP | |
1271 | .B @urlquote{\fISTRING\fB}@ | |
1272 | URL-quote \fISTRING\fR. | |
1273 | .TP | |
fdf98378 | 1274 | .B @user@ |
c0c23a60 RK |
1275 | The current username. |
1276 | This will be "guest" if nobody is logged in. | |
fdf98378 | 1277 | .TP |
968f044a | 1278 | .B @userinfo{\fIPROPERTY\fB}@ |
1279 | Look up a property of the logged-in user. | |
1280 | .TP | |
460b9539 | 1281 | .B @version@ |
1282 | Expands to \fBdisorder.cgi\fR's version string. | |
1283 | .TP | |
1284 | .B @volume:\fISPEAKER\fB@ | |
c0c23a60 RK |
1285 | The volume on the left or right speaker. |
1286 | \fISPEAKER\fR must be \fBleft\fR or \fBright\fR. | |
460b9539 | 1287 | .TP |
1288 | .B @when@ | |
1289 | When the current track was played (or when it is expected to be played, if it | |
1290 | has not been played yet) | |
1291 | .TP | |
1292 | .B @who@ | |
1293 | Who submitted the current track. | |
1294 | .SH "WEB OPTIONS" | |
1295 | This is a file called \fIoptions\fR, searched for in the same manner | |
c0c23a60 RK |
1296 | as templates. |
1297 | It includes numerous options for the control of the web interface. | |
1298 | The general syntax is the same as the main configuration | |
460b9539 | 1299 | file, except that it should be encoded using UTF-8 (though this might |
1300 | change to the current locale's character encoding; stick to ASCII to | |
1301 | be safe). | |
1302 | .PP | |
1303 | The shipped \fIoptions\fR file includes four standard options files. | |
1304 | In order, they are: | |
1305 | .TP | |
1306 | .I options.labels | |
c0c23a60 RK |
1307 | The default labels file. |
1308 | You wouldn't normally edit this directly - instead supply your own commands | |
1309 | in \fIoptions.user\fR. | |
1310 | Have a look at the shipped version of the file for documentation of | |
1311 | labels used by the standard templates. | |
460b9539 | 1312 | .TP |
1313 | .I options.user | |
c0c23a60 RK |
1314 | A user options file. |
1315 | Here you should put any overrides for the default labels and any | |
1316 | extra labels required by your modified templates. | |
460b9539 | 1317 | .PP |
1318 | Valid directives are: | |
1319 | .TP | |
1320 | .B columns \fINAME\fR \fIHEADING\fR... | |
c0c23a60 RK |
1321 | Defines the columns used in \fB@playing@\fR and \fB@recent@\fB. |
1322 | \fINAME\fR must be either \fBplaying\fR, \fBrecent\fR or \fBsearch\fR. | |
1323 | \fIHEADING\fR... is a list of heading names. | |
1324 | If a column is defined more than once then the last definitions is used. | |
460b9539 | 1325 | .IP |
1326 | The heading names \fBbutton\fR, \fBlength\fR, \fBwhen\fR and \fBwho\fR | |
1327 | are built in. | |
1328 | .TP | |
1329 | .B include \fIPATH\fR | |
c0c23a60 RK |
1330 | Includes another file. |
1331 | If \fIPATH\fR starts with a \fB/\fR then it is taken as is, otherwise | |
1332 | it is searched for in the template path. | |
460b9539 | 1333 | .TP |
1334 | .B label \fINAME\fR \fIVALUE\fR | |
c0c23a60 RK |
1335 | Define a label. |
1336 | If a label is defined more than once then the last definition is used. | |
460b9539 | 1337 | .SS Labels |
1338 | Some labels are defined inside \fBdisorder.cgi\fR and others by the | |
c0c23a60 RK |
1339 | default templates. |
1340 | You can define your own labels and use them inside a template. | |
460b9539 | 1341 | .PP |
1342 | When an undefined label is expanded, if it has a dot in its name then | |
c0c23a60 RK |
1343 | the part after the final dot is used as its value. |
1344 | Otherwise the whole name is used as the value. | |
460b9539 | 1345 | .PP |
1346 | Labels are no longer documented here, see the shipped \fIoptions.labels\fR file | |
1347 | instead. | |
1348 | .SH "REGEXP SUBSTITUTION RULES" | |
c0c23a60 RK |
1349 | Regexps are PCRE regexps, as defined in \fBpcrepattern\fR(3). |
1350 | The only option used is \fBPCRE_UTF8\fR. | |
1351 | Remember that the configuration file syntax means you have to | |
1352 | escape backslashes and quotes inside quoted strings. | |
460b9539 | 1353 | .PP |
1354 | In a \fISUBST\fR string the following sequences are interpreted | |
1355 | specially: | |
1356 | .TP | |
1357 | .B $1 \fR... \fB$9 | |
1358 | These expand to the first to ninth bracketed subexpression. | |
1359 | .TP | |
1360 | .B $& | |
1361 | This expands to the matched part of the subject string. | |
1362 | .TP | |
1363 | .B $$ | |
1364 | This expands to a single \fB$\fR symbol. | |
1365 | .PP | |
1366 | All other pairs starting with \fB$\fR are undefined (and might be used | |
1367 | for something else in the future, so don't rely on the current | |
1368 | behaviour.) | |
1369 | .PP | |
c0c23a60 RK |
1370 | If \fBi\fR is present in \fIREFLAGS\fR then the match is case-independent. |
1371 | If \fBg\fR is present then all matches are replaced, otherwise only the first | |
460b9539 | 1372 | match is replaced. |
1373 | .SH "ACTIONS" | |
1374 | What the web interface actually does is terminated by the \fBaction\fR CGI | |
c0c23a60 RK |
1375 | argument. |
1376 | The values listed below are supported. | |
460b9539 | 1377 | .PP |
1378 | Except as specified, all actions redirect back to the \fBplaying.html\fR | |
1379 | template unless the \fBback\fR argument is present, in which case the URL it | |
1380 | gives is used instead. | |
1381 | .PP | |
1382 | Redirection to \fBplaying.html\fR preserves \fBmgmt=true\fR if it is present. | |
1383 | .TP 8 | |
1384 | .B "move" | |
1385 | Move track \fBid\fR by offset \fBdelta\fR. | |
1386 | .TP | |
1387 | .B "play" | |
1388 | Play track \fBfile\fR, or if that is missing then play all the tracks in | |
1389 | \fBdirectory\fR. | |
1390 | .TP | |
1391 | .B "playing" | |
1392 | Don't change any state, but instead compute a suitable refresh time and include | |
c0c23a60 RK |
1393 | that in an HTTP header. |
1394 | Expands the \fBplaying.html\fR template rather than redirecting. | |
460b9539 | 1395 | .IP |
1396 | This is the default if \fBaction\fR is missing. | |
1397 | .TP | |
0d350ff0 | 1398 | .B "random\-disable" |
460b9539 | 1399 | Disables random play. |
1400 | .TP | |
0d350ff0 | 1401 | .B "random\-enable" |
460b9539 | 1402 | Enables random play. |
1403 | .TP | |
1404 | .B "disable" | |
1405 | Disables play completely. | |
1406 | .TP | |
1407 | .B "enable" | |
1408 | Enables play. | |
1409 | .TP | |
1410 | .B "pause" | |
1411 | Pauses the current track. | |
1412 | .TP | |
1413 | .B "remove" | |
1414 | Remove track \fBid\fR. | |
1415 | .TP | |
1416 | .B "resume" | |
1417 | Resumes play after a pause. | |
1418 | .TP | |
1419 | .B "scratch" | |
c0c23a60 RK |
1420 | Scratch the playing track. |
1421 | If \fBid\fR is present it must match the playing track. | |
460b9539 | 1422 | .TP |
1423 | .B "volume" | |
1424 | Change the volume by \fBdelta\fR, or if that is missing then set it to the | |
c0c23a60 RK |
1425 | values of \fBleft\fR and \fBright\fR. |
1426 | Expands to the \fBvolume.html\fR template rather than redirecting. | |
460b9539 | 1427 | .TP |
1428 | .B "prefs" | |
1429 | Adjust preferences from the \fBprefs.html\fR template (which it then expands | |
1430 | rather than redirecting). | |
1431 | .IP | |
1432 | If | |
1433 | .B parts | |
c0c23a60 RK |
1434 | is set then the cooked interface is assumed. |
1435 | The value of | |
460b9539 | 1436 | .B parts |
c0c23a60 RK |
1437 | is used to determine which trackname preferences are set. |
1438 | By default the | |
460b9539 | 1439 | .B display |
1440 | context is adjusted but this can be overridden with the | |
1441 | .B context | |
c0c23a60 RK |
1442 | argument. |
1443 | Also the | |
460b9539 | 1444 | .B random |
1445 | argument is checked; if it is set then random play is enabled for that track, | |
1446 | otherwise it is disabled. | |
1447 | .IP | |
1448 | Otherwise if the | |
1449 | .B name | |
1450 | and | |
1451 | .B value | |
1452 | arguments are set then they are used to set a single preference. | |
1453 | .IP | |
1454 | Otherwise if just the | |
1455 | .B name | |
1456 | argument is set then that preference is deleted. | |
1457 | .IP | |
1458 | It is recommended that links to the \fBprefs\fR action use \fB@resolve@\fR to | |
c0c23a60 RK |
1459 | enure that the real track name is always used. |
1460 | Otherwise if the preferences page is used to adjust a trackname_ preference, | |
1461 | the alias may change, leading to the URL going stale. | |
460b9539 | 1462 | .TP |
1463 | .B "error" | |
1464 | This action is generated automatically when an error occurs connecting to the | |
c0c23a60 RK |
1465 | server. |
1466 | The \fBerror\fR label is set to an indication of what the error is. | |
460b9539 | 1467 | .SH "TRACK NAME PARTS" |
1468 | The traditional track name parts are \fBartist\fR, \fBalbum\fR and \fBtitle\fR, | |
c0c23a60 RK |
1469 | with the obvious intended meaning. |
1470 | These are controlled by configuration and by \fBtrackname_\fR preferences. | |
460b9539 | 1471 | .PP |
1472 | In addition there are two built-in parts, \fBpath\fR which is the whole path | |
1473 | name and \fBext\fR which is the filename extension, including the initial dot | |
1474 | (or the empty string if there is not extension). | |
1475 | .SH "SEE ALSO" | |
0d350ff0 | 1476 | \fBdisorder\fR(1), \fBsox\fR(1), \fBdisorderd\fR(8), \fBdisorder\-dump\fR(8), |
460b9539 | 1477 | \fBpcrepattern\fR(3) |
1478 | .\" Local Variables: | |
1479 | .\" mode:nroff | |
1480 | .\" fill-column:79 | |
1481 | .\" End: |