Overview
task.conf defines 'tasks' present on the server. Currently a task is a combination of directory settings and playlist options. In the future more may well be added here.
Paths
A lot of the following details are concerned with generating the eventual directory and file name of a file. There are a few rules that govern this behaviour:
- Directories can be specified anywhere. That is, even for a 'file' field you can include a sequence of directories separated by a forward slash. A valid value for playlist-file is meta/playlist/allsongs.m3u.
- Each path can be absolute or relative. Even if there is a global base value and/or a section base value you can start a path with a forward slash and define a path from the root of the filesystem.
- Any data supplied as part of the job description file can be used in the path by capitalising and surround by percent symbols, e.g. %DISC-TITLE%.
- Remember that by placing _THE after the variable name you can alter the appearance of values that start with the word "The". In this case the word "the" is moved to the end of the value after a comma. So, if the artist value was "The Band" and we used the symbol %ARTIST_THE% the value used would be "Band, The".
Sections
Global
| Key | Example value | Description |
|---|---|---|
| base | /media/ | The path specified here is prefixed to all relative paths in the other sections. This key must be present but may be left blank. |
Other
Each of the other sections in the task file define a task. The section name is used as the name of the task.
| Key | Example value | Description |
|---|---|---|
| base | audio/discs/%DISC-ARTIST_THE% - %DISC-TITLE%/ | Optional field. If a relative path is used it is suffixed to the global base value to form the base path for this task. If an absolute path is used it overrides global base. |
| class-allow | mp3-high,lossless-flac | Comma separated list of classes to allow for this task. If omitted any class can be used. |
| description | Albums and singles | A description of the task. |
| file | %TITLE% | The final file name of the file. |
| file-multi | %TITLE% - %ARTIST% | Optional field. If specified this path will be used for tasks that have the multi field set. This is set by wagdisc for discs declared as being multi-artist. |
| playlist-file | playlist.m3u | The name of the playlist to create. Playlists are simply one file name per line formatted files. Optional field. |
| process-encoded-x | clear_old_tags %FILE% | Processes the encoded file before tagging. |
| process-final-x | touch "%CONFIG/state/file/dir%.updated" | Runs commands after encoded file has been moved. |
| process-raw-x | normalize %FILE% | Processes the decompressed file. Skipped if file is not being encoded. |
| type | audio | The type of the task. Currently always audio. |
Processing tasks
The fields process-encoded-x, process-final-x and process-raw-x allow arbitrary processing instructions to be carried out at various stages of encoding. In each case x is a number which determines the order in which the instructions within that group are carried out. Note that task 1 is carried out first, consecutive numbers are not required and numbers cannot be duplicated within a group.
For process-raw %IN% and %FILE% are set to the name of the decompressed/original WAV file. For process-encoded these fields reference the encoded file. In each case %OUT% can be used for commands that require separate in and out files, e.g. sox %IN% %OUT% reverse. process-final does not define %IN%, %FILE% or %OUT%.
All stages have access to the task description data, as with paths, and configuration file settings.
State variables
Additionally there is a memory-only configuration file called 'state' which provide extra information. Some of these fields are only available in the process-final stage.
Note that playlist fields are only created if a playlist was written to.
