feat(dl): let a service force --license-first with the LICENSE_FIRST class variable

This commit is contained in:
imSp4rky
2026-12-05 20:23:47 -07:00
parent ce7cb41eac
commit bd178bc3af
18 changed files with 59 additions and 5 deletions
+3 -1
View File
@@ -446,7 +446,8 @@ file on the server travels as base64, and the client writes it to its own temp d
"server_cdm": false,
"server_cdm_type": "widevine",
"sample_decrypt_tracks": [],
"fairplay_bridge": false
"fairplay_bridge": false,
"license_first": false
}
```
@@ -461,6 +462,7 @@ The remote session fields (`TracksReply`):
| `server_cdm_type` | The DRM system that a server-CDM licence takes first for the tracks of this title. |
| `sample_decrypt_tracks` | The IDs of the tracks that the service decrypts itself, through the `samples` route. |
| `fairplay_bridge` | `true` when the service licenses FairPlay-only tracks through a bridge on the server. |
| `license_first` | The `LICENSE_FIRST` value of the service. When `true`, the client licenses every track of a title before any track downloads, as with `--license-first`. |
| Status | Error code | Meaning |
| --- | --- | --- |
+1 -1
View File
@@ -216,7 +216,7 @@ Keep only certain track types, or skip certain track types.
| `--vaults-only` | Get no licence. A content key that no key vault, export or earlier track gives fails the title. With both flags, the last one wins. |
| `--cdm <name>` | Use the named CDM device for this run, and ignore the `cdm` config mapping, its quality and Widevine/PlayReady entries included. Over `--remote`, that device licenses the remote session, not the server CDM. |
| `--skip-dl` | Skip the download but still retrieve keys. |
| `--license-first` | Get the content keys of every track of a title before any track of that title downloads. A failed licence then stops the run before that title downloads data. Over `--remote` it applies on the client. No effect with `--skip-dl`. |
| `--license-first` | Get the content keys of every track of a title before any track of that title downloads. A failed licence then stops the run before that title downloads data. Over `--remote` it applies on the client. No effect with `--skip-dl`. A service can turn it on for every run with [`LICENSE_FIRST`](../reference/api/service.md). |
| `--all-drm` | License each track with both Widevine and PlayReady. Needs a CDM for each DRM system. Key Vaults are read first; `--cdm-only` sends a challenge for each system. Not for use with `--cdm`. |
| `--export` | Write an [export](downloading.md#keys-vaults-and-export) of each title's tracks, DRM init data and content keys to the exports directory. |
+1
View File
@@ -68,6 +68,7 @@ prints every title the service returned and stops before `--wanted`/`--latest-ep
filtering. `--skip-dl` runs the licence step but skips the segment download.
`--license-first` runs the licence step of every track of a title before any segment of that title downloads,
so a failed licence stops the run before that title downloads data. The download then sends no second licence.
A service can turn it on for every run with [`LICENSE_FIRST`](../reference/api/service.md).
## Choosing quality
+1 -1
View File
@@ -56,7 +56,7 @@ Common config keys. This is a useful subset, and every `dl` flag works:
| `slow` | str | *(unset)* | Inter-title delay, e.g. `"20-40"`. |
| `best_available` | bool | `false` | Warn instead of failing when a requested resolution, range, video language, or audio language is missing, or when one DRM system does not license under `--all-drm`. The CLI flag is `--best-available`, also spelled `--warn-only`. |
| `skip_missing` | bool | `false` | Skip a title that misses a required language (`require_audio`, `require_video`, `require_subs`) or a track that a filter asks for, and continue with the next title. A run with one title, or a run that skips every title, still fails. The CLI flag is `--skip-missing`. For REST API jobs, set it in the [`serve`](services.md#serve) block. |
| `license_first` | bool | `false` | Get the content keys of every track of a title before any track of that title downloads. A failed licence stops the run before that title downloads data. The CLI flag is `--license-first`. For REST API jobs, set it in the [`serve`](services.md#serve) block or send `license_first` in the request. |
| `license_first` | bool | `false` | Get the content keys of every track of a title before any track of that title downloads. A failed licence stops the run before that title downloads data. The CLI flag is `--license-first`. A `false` value does not turn off the [`LICENSE_FIRST`](../api/service.md) of a service. For REST API jobs, set it in the [`serve`](services.md#serve) block or send `license_first` in the request. |
| `generate_dv` | bool | `false` | With `-r HYBRID`, make Dolby Vision from the HDR10+ metadata or the decoded video when a title has no DV track. With `-r HDR10` or `-r HDR10P`, make it for that base and ignore a DV track. See [Dolby Vision without a DV track](../../guide/downloading.md#dolby-vision-without-a-dv-track). |
| `proxy` | str | *(unset)* | Default proxy URI or 2-letter country. |
| `no_folder` | bool | `false` | Do not create a per-title folder. |