Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/TheOutdoorProgrammer/crate/llms.txt

Use this file to discover all available pages before exploring further.

After a download completes and before metadata tags are written, the organizer moves the file from the slskd downloads directory into your library folder. The destination path is derived from a naming template you control, so Crate can match whatever folder structure your media player or NAS convention expects.

How the Organizer Works

Once a transfer succeeds, the organizer:
  1. Finds the downloaded file by basename inside the downloads directory (searching recursively).
  2. Resolves the destination path by rendering the naming template against the track’s metadata.
  3. Creates any missing parent directories.
  4. Moves the file to the destination (rename if same device, copy-then-delete if cross-device).
  5. Removes the file it replaced, if the track was already owned at a different path (e.g. a quality upgrade after a template change).
  6. Calls the tagger to write metadata into the newly moved file.
  7. Records the library-relative path on the track record.

Default Template

{artist}/{album} ({year})/{track:2} - {title}
For example, track 6 of Radiohead’s OK Computer (1997) would be organized as:
Radiohead/OK Computer (1997)/06 - Karma Police.flac
The file extension is appended automatically based on the source file — do not include it in the template.

Token Reference

TokenMeaning
{artist} / {albumartist}Artist name. These are identical — Crate tracks album artists only.
{album}Album title.
{year}Album release year. Renders empty when the year is unknown.
{track}Track number. Supports zero-padding: {track:2}06.
{disc}Disc number. Supports padding. Renders empty when unknown or 0.
{title}Track title.
Numeric tokens ({track} and {disc}) accept an optional pad width after a colon. {track:2} left-pads the track number with zeros to at least 2 digits; {track:3} pads to 3. Any other token does not support a pad width — the template validator will reject it.

Dangling Decoration Cleanup

When an empty token like {year} appears inside decoration (parentheses, brackets, separators), Crate automatically removes the orphaned punctuation rather than leaving ugly artifacts:
Template segmentYear knownYear unknown
{album} ({year})OK Computer (1997)OK Computer
{disc}-{track:2}1-06 (disc 1)06 (disc 0)
Cleanup iterates until stable, so nested empty tokens like ({year} - {disc}) also collapse correctly.

Template Rules

Do not start the template with / or \. The library root is added automatically.
The filename segment (everything after the last /) must include at least one of {title} or {track} so individual tracks get unique names within an album folder.
Doubled or trailing slashes, and segments that consist entirely of blank-able tokens (like a standalone {year} segment), are rejected at validation time.
Characters that are unsafe on common filesystems — < > : " / \ | ? * — are replaced with _ in every metadata value before it is written into the path.

Applying Template Changes

The naming template applies only to new downloads. Changing it does not rename or move files that are already in the library. However, when a quality upgrade downloads a better copy, it uses the current template for the new path and removes the old file — even if the old file was organized under a different template.
Files imported from an existing library are never moved, renamed, or modified, regardless of how the naming template changes. This includes both the initial import and any subsequent template edits.

Example Templates

{artist}/{album} ({year})/{track:2} - {title}
Radiohead/OK Computer (1997)/06 - Karma Police.flac

Live Preview

The Settings UI renders a live preview of your template against a fixed sample track (Radiohead — OK Computer — Karma Police) as you type. The same preview is available via the API:
GET /api/settings/naming-preview?template={artist}/{album} ({year})/{track:2} - {title}
{
  "path": "Radiohead/OK Computer (1997)/06 - Karma Police.flac"
}
The API returns an error with a human-readable message if the template is invalid, so the UI can show inline validation feedback without attempting to save a broken template.

Build docs developers (and LLMs) love