refactor(api): resolve service options once with requested_service_options

This commit is contained in:
imSp4rky
2026-11-28 13:44:57 -07:00
parent 32250f6f95
commit 63dd037ebd
4 changed files with 52 additions and 20 deletions
+4 -2
View File
@@ -498,8 +498,10 @@ Make a download job. It requires `service` and `title_id`. Every other field is
**Service options.** A service's own CLI options travel in the same body. Send them in a nested
`service_params` object, or as flat top-level keys. When the body has `service_params`, the server
reads service options only from it, and every flat key is a `dl` value. Without it, a flat key that
is also a `dl` option, such as `quality` or `lang`, stays a `dl` value. An option you leave out
reads service options only from it, and every flat key is a `dl` value. A name in `service_params`
can be the option's flag, such as `zone` for `--zone`, or its parameter name. Without
`service_params`, a flat key that is also a `dl` option, such as `quality` or `lang`, stays a `dl`
value, and the server logs a warning when the service has an option of the same name. An option you leave out
takes the default declared on the service's `cli` command, so the job matches the equivalent `dl`
run. The server checks each service option against that option's type, and a value it refuses gets
`400 INVALID_PARAMETERS`. `profile` at the top level always means the credential