docs(config): explain how to set defaults for a service's own options

This commit is contained in:
imSp4rky
2026-12-02 18:41:16 -07:00
parent 20e06665a1
commit 5f152fdace
2 changed files with 45 additions and 3 deletions
+31
View File
@@ -109,6 +109,37 @@ dl:
request body, `workers: 0` for example, makes each job that uses it fail at submit with
`400 INVALID_PARAMETERS`.
### Service option defaults
A service can have its own options, which `unshackle dl <TAG> --help` lists. To give one a
default, add a block under `dl:` and name it with the service tag.
- **Block name:** the tag exactly as you type it on the command line. A `dl:` block named
`EXAMPLE1` applies to `dl EXAMPLE1` and not to `dl example1`.
- **Config key:** the option's long name with dashes replaced by underscores (`--<word>-<word>` →
`<word>_<word>`). Do not use the short flag, and do not keep the dashes: the run ignores an
unknown config key without a warning.
A service option can store its value under another name, as some `dl` options do.
When a config key has no effect, look for that name in the option's definition in the service code.
- **Value:** `true` for a flag, or the value that you would type after the option.
```yaml
dl:
EXAMPLE1:
extra_mode: true
video_profile: ALL
```
The defaults also apply when the service runs on a [remote server](services.md#remote_services),
with `--remote` or with `services.<TAG>.dl.remote`. An option that you type on the command line
replaces the default. A flag that the config sets to `true` stays on unless the service gives the
flag an off form. To turn it off for one run, remove it from the config.
Do not put service options in [`services.<TAG>.dl`](services.md). That block takes only `dl`
options, and it ignores a service option with an `Ignoring unknown dl option` warning.
A setting from the service's own `config.yaml` is not an option: it goes in the service's block
in [`services`](services.md#services).
### Completion archive
`dl.skip_existing: true` opts CLI downloads into an append-only completion archive under