mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-03 06:25:10 +00:00
docs(config): explain how to set defaults for a service's own options
This commit is contained in:
@@ -15,15 +15,24 @@ Per-service configuration, keyed by the service tag in any case (for example `EX
|
||||
- **`title_map`**: an exact-match rename map applied to fetched titles (source name →
|
||||
desired name), so a service that names a title differently from your library still matches.
|
||||
- **`dl`**: per-service download defaults, using the same keys as the global
|
||||
[`dl`](download.md#dl) block. Set `remote: true` to send the `dl` and `search` runs of that
|
||||
[`dl`](download.md#dl) block. A service's own options go in the global `dl` block, see
|
||||
[service option defaults](download.md#service-option-defaults). Set `remote: true` to send the `dl` and `search` runs of that
|
||||
service to a [remote server](#remote_services) without `--remote`. Add `server` to select one of
|
||||
several servers. On the command line, `--local` and `--server` override these keys. A REST API job ignores both keys.
|
||||
A REST API job takes the other keys that it accepts as download parameters as its defaults,
|
||||
above the `serve` defaults and below the values that the request sends.
|
||||
See [making a service remote by default](../../dev/rest-api/remote-sessions.md#making-a-service-remote-by-default).
|
||||
|
||||
Individual services may read any additional keys they define. unshackle hands the merged result
|
||||
(the service's own `config.yaml` with this block layered on top) to the service as `self.config`.
|
||||
A service can also read settings of its own, such as a preferred metadata language. The service's own
|
||||
`config.yaml` and its README, when it has one, name them. To change one, copy its config key into this
|
||||
block with the same nesting. unshackle merges this block over the service's `config.yaml` and gives
|
||||
the result to the service as `self.config`. A nested config key replaces only that value, so the
|
||||
other values in the same section stay.
|
||||
|
||||
Over `--remote`, the server builds the service from its own config. The client sends only the
|
||||
config keys that the service lists for a client identity, see
|
||||
[your own device identity](../../dev/rest-api/remote-sessions.md#your-own-device-identity).
|
||||
For every other setting, the value in the server's config applies.
|
||||
|
||||
User- or device-specific values (API keys, account IDs, device attributes) belong in this block
|
||||
rather than in the service's own `config.yaml`, which holds shared defaults. See
|
||||
@@ -37,6 +46,8 @@ services:
|
||||
"nordvpn:ca": ca-toronto
|
||||
title_map:
|
||||
"My Show: The Movie": "My Show Presents The Movie"
|
||||
preferences:
|
||||
language: ko
|
||||
```
|
||||
|
||||
## `credentials`
|
||||
|
||||
Reference in New Issue
Block a user