mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-05 07:25:08 +00:00
docs(rest-api): build the download request table from the OpenAPI yaml
This commit is contained in:
@@ -224,26 +224,11 @@ JOB=$(curl -s -X POST "$BASE/api/download" \
|
||||
| python -c "import sys, json; print(json.load(sys.stdin)['job_id'])")
|
||||
```
|
||||
|
||||
### Frequently used download fields
|
||||
### Download fields
|
||||
|
||||
The request body accepts the full download parameter set. A few of the most useful:
|
||||
The request body takes every `dl` option. The [request body table](endpoints.md#post-apidownload) gives the type, default and meaning of each field.
|
||||
|
||||
| Field | Default | Meaning |
|
||||
| --- | --- | --- |
|
||||
| `service` | - | Service tag (required) |
|
||||
| `title_id` | - | Title identifier (required) |
|
||||
| `profile` | `null` | Named credential/cookie profile to use |
|
||||
| `quality` | `[]` | Resolution(s), e.g. `[1080]`; empty means best available |
|
||||
| `vcodec` | `[]` | Video codec, e.g. `"H265"` |
|
||||
| `acodec` | `[]` | Audio codec, e.g. `"EC3"` |
|
||||
| `range` | `["SDR"]` | Dynamic range: `SDR`, `HDR10`, `HDR10+`, `VIVID`, `DV`, `HLG`, `HYBRID` |
|
||||
| `wanted` | `[]` | Episodes to fetch, e.g. `["S01E01"]`, or music tracks, e.g. `["1-5"]`. Empty means all |
|
||||
| `lang` | `["orig"]` | Video/audio language(s) |
|
||||
| `s_lang` | `["all"]` | Subtitle language(s) |
|
||||
| `downloads` | `1` | Number of tracks to download concurrently |
|
||||
| `proxy` | `null` | Proxy URI or country code |
|
||||
|
||||
Validation is strict: invalid codecs, subtitle formats, dynamic-range names, non-positive counts, or flags that conflict (for example both `no_subs` and `subs_only`) come back as `400` with error code `INVALID_PARAMETERS`. See the full reference on the [download reference page](endpoints.md) for every accepted field.
|
||||
Validation is strict: invalid codecs, subtitle formats, dynamic-range names, non-positive counts, or flags that conflict (for example both `no_subs` and `subs_only`) come back as `400` with error code `INVALID_PARAMETERS`.
|
||||
|
||||
!!! note "Gated fields"
|
||||
The server refuses a per-request CDM (`cdm`) or inline credentials (`credential` / `credentials`) with `403 FORBIDDEN`, unless the server operator has explicitly opted in with `serve.cdm_overrides` and `serve.allow_job_credentials`. Both are off by default.
|
||||
|
||||
Reference in New Issue
Block a user