mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-06-11 03:32:10 +00:00
fix(dl): apply per-service dl config overrides for all options
services.<TAG>.dl values only applied when the key was also set in the global dl: section (equality check against config.dl missed Click's declared defaults). Gate on Click's ParameterSource instead: CLI/env > service dl > global dl > defaults, converted via each option's own type. - record parameter sources on serve's hand-built context so client values are never clobbered - accept range/list as natural keys for range_/list_ - harden QualityList (YAML int) and SlowDelayRange (YAML bool) converts
This commit is contained in:
@@ -30,7 +30,18 @@ service tag in the `services` section. Supported override keys include: `dl`, `s
|
||||
`headers`, `proxy_map`, `title_map`, and more.
|
||||
|
||||
Overrides are merged with global config (not replaced) -- only specified keys are overridden, others
|
||||
use global defaults. CLI arguments always take priority over service-specific config.
|
||||
use global defaults.
|
||||
|
||||
Any `dl` command option can be overridden per service. Use the option name with dashes as underscores
|
||||
(`--v-lang` -> `v_lang`). `range` and `list` work as-is; their internal Python names (`range_`,
|
||||
`list_`, suffixed to avoid the builtins) are also accepted.
|
||||
|
||||
Precedence (highest first):
|
||||
|
||||
1. Explicit CLI arguments / environment variables (e.g. `--v-lang en`)
|
||||
2. Per-service config (`services.<TAG>.dl`)
|
||||
3. Global `dl:` config
|
||||
4. Built-in option defaults
|
||||
|
||||
For example,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user