mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-05 15:35:06 +00:00
docs(cli): make cli-reference the one description of each dl flag and downloading.md the task guide
This commit is contained in:
@@ -198,7 +198,7 @@ tags the result.
|
|||||||
| `-r`, `--range` | Dynamic range, e.g. `-r HDR10` or `-r DV`. Defaults to `SDR`. |
|
| `-r`, `--range` | Dynamic range, e.g. `-r HDR10` or `-r DV`. Defaults to `SDR`. |
|
||||||
| `-w`, `--wanted` | Which episodes, e.g. `-w S01` or `-w S01E01-S01E03`. For music, which tracks, e.g. `-w 1-5` or `-w 2x3` for disc 2 track 3. |
|
| `-w`, `--wanted` | Which episodes, e.g. `-w S01` or `-w S01E01-S01E03`. For music, which tracks, e.g. `-w 1-5` or `-w 2x3` for disc 2 track 3. |
|
||||||
| `-o`, `--output` | Override the output directory for this run. |
|
| `-o`, `--output` | Override the output directory for this run. |
|
||||||
| `--list` | List the tracks that would be downloaded, then stop. |
|
| `--list` | List every track of each title, then stop before track selection. |
|
||||||
|
|
||||||
!!! example "A few realistic variations"
|
!!! example "A few realistic variations"
|
||||||
```shell
|
```shell
|
||||||
@@ -212,8 +212,8 @@ tags the result.
|
|||||||
unshackle dl --latest-episode EXAMPLE 81234567
|
unshackle dl --latest-episode EXAMPLE 81234567
|
||||||
```
|
```
|
||||||
|
|
||||||
See [Downloading](../guide/downloading.md) for the complete flag reference, including
|
See the [CLI reference](../guide/cli-reference.md#dl) for every flag, and
|
||||||
codec, bitrate, channel-layout, and track-type selection.
|
[Downloading](../guide/downloading.md) for codec, bitrate, channel-layout, and track-type selection.
|
||||||
|
|
||||||
## 8. Where the output lands
|
## 8. Where the output lands
|
||||||
|
|
||||||
@@ -229,7 +229,7 @@ unshackle dl -q 1080 -o /mnt/media/incoming EXAMPLE 81234567
|
|||||||
|
|
||||||
- unshackle writes **movies** as a single `.mkv` file named from your `movies` template.
|
- unshackle writes **movies** as a single `.mkv` file named from your `movies` template.
|
||||||
- unshackle groups **TV episodes** into a per-show / per-season folder (from your
|
- unshackle groups **TV episodes** into a per-show / per-season folder (from your
|
||||||
`series` template) unless you pass `--no-folder`.
|
`series` template). `--no-folder` writes every title directly in the output directory.
|
||||||
- unshackle builds the filename from your `output_template` and adds IMDb/TMDB/TVDB IDs to
|
- unshackle builds the filename from your `output_template` and adds IMDb/TMDB/TVDB IDs to
|
||||||
the file's metadata tags when available.
|
the file's metadata tags when available.
|
||||||
|
|
||||||
|
|||||||
+62
-62
@@ -52,8 +52,7 @@ unshackle dl [OPTIONS] SERVICE [SERVICE ARGS...]
|
|||||||
- `SERVICE`: a service tag (for example `EXAMPLE1` or `EXAMPLE2`). Tags are case-insensitive and honour each service's aliases (`example+`, `EXAMPLE2`, and the other alias forms all give the same tag).
|
- `SERVICE`: a service tag (for example `EXAMPLE1` or `EXAMPLE2`). Tags are case-insensitive and honour each service's aliases (`example+`, `EXAMPLE2`, and the other alias forms all give the same tag).
|
||||||
- `SERVICE ARGS`: the title, URL, or ID, plus any service-specific options. These belong to the service, not to `dl`.
|
- `SERVICE ARGS`: the title, URL, or ID, plus any service-specific options. These belong to the service, not to `dl`.
|
||||||
|
|
||||||
!!! example "Typical downloads"
|
```shell title="Typical downloads"
|
||||||
```shell
|
|
||||||
# Best available 1080p SDR of a title
|
# Best available 1080p SDR of a title
|
||||||
unshackle dl -q 1080 EXAMPLE 81234567
|
unshackle dl -q 1080 EXAMPLE 81234567
|
||||||
|
|
||||||
@@ -64,8 +63,10 @@ unshackle dl [OPTIONS] SERVICE [SERVICE ARGS...]
|
|||||||
unshackle dl -w S01-S03 -v H.265 -a EC3 SERVICE TITLE-ID
|
unshackle dl -w S01-S03 -v H.265 -a EC3 SERVICE TITLE-ID
|
||||||
```
|
```
|
||||||
|
|
||||||
!!! note "Config-driven defaults"
|
[Downloading](downloading.md) shows how these flags work together for common tasks.
|
||||||
You can give any `dl` flag a default under the `dl:` section of `unshackle.yaml`, and per-service under `services.<TAG>.dl`. Explicit command-line values (and environment values) always win over both. Service defaults only fill in options you did not set. See the [configuration file](../getting-started/configuration-file.md) guide.
|
|
||||||
|
!!! note "Defaults from the configuration file"
|
||||||
|
You can give any `dl` flag a default in the [`dl`](../reference/configuration/download.md#dl) block of `unshackle.yaml`, and for one service under `services.<TAG>.dl`. A REST API download job takes most of these options: [`POST /api/download`](../dev/rest-api/endpoints.md#post-apidownload) lists them.
|
||||||
|
|
||||||
### Quality, codec, bitrate & range
|
### Quality, codec, bitrate & range
|
||||||
|
|
||||||
@@ -73,23 +74,43 @@ unshackle dl [OPTIONS] SERVICE [SERVICE ARGS...]
|
|||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `-p`, `--profile` | - | Profile for credentials and cookies. |
|
| `-p`, `--profile` | - | Profile for credentials and cookies. |
|
||||||
| `-q`, `--quality` | best | Resolution(s), comma-separated, e.g. `1080,720`. `-q 1080` also matches anamorphic tracks by 16:9 canvas, and padded encodes by standard resolution. |
|
| `-q`, `--quality` | best | Resolution(s), comma-separated, e.g. `1080,720`. `-q 1080` also matches anamorphic tracks by 16:9 canvas, and padded encodes by standard resolution. |
|
||||||
| `-v`, `--vcodec` | any | Video codec(s). Accepts names or values: `AVC`/`H.264`/`H264`, `HEVC`/`H.265`/`H265`, `VVC`/`H.266`/`H266`, `VC1`/`VC-1`, `VP8`, `VP9`, `AV1`. |
|
| `-v`, `--vcodec` | any | Video codec(s). Accepts names or values: `AVC`/`H.264`/`H264`, `HEVC`/`H.265`/`H265`, `VVC`/`H.266`/`H266`, `VC1`/`VC-1`, `VP8`, `VP9`, `AV1`, `LCEVC`. unshackle selects an LCEVC track only when you name it, because it cannot play without its base video track. |
|
||||||
| `-a`, `--acodec` | any | Audio codec(s), comma-separated. Accepts `AAC`, `AC3`/`DD`, `EC3`/`DD+`/`eac3`/`ddp`, `AC4`/`AC-4`, `OPUS`, `OGG`/`VORB`/`vorbis`, `DTS`, `DTSX`/`DTS-X`, `ALAC`, `FLAC`, `MP3`. |
|
| `-a`, `--acodec` | any | Audio codec(s), comma-separated. Accepts a name or a value from [Audio codec values](#audio-codec-values), and the aliases `eac3` and `ddp` (`EC3`) and `vorbis` (`OGG`). |
|
||||||
| `-vb`, `--vbitrate` | highest | Exact video bitrate in kbps. |
|
| `-vb`, `--vbitrate` | highest | Exact video bitrate in kbps. |
|
||||||
| `-ab`, `--abitrate` | highest | Exact audio bitrate in kbps. |
|
| `-ab`, `--abitrate` | highest | Exact audio bitrate in kbps. |
|
||||||
| `-vb-range`, `--vbitrate-range` | - | Video bitrate range in kbps, e.g. `6000-7000`; picks highest within. Mutually exclusive with `--vbitrate`. |
|
| `-vb-range`, `--vbitrate-range` | - | Video bitrate range in kbps, e.g. `6000-7000`; picks highest within. Mutually exclusive with `--vbitrate`. |
|
||||||
| `-ab-range`, `--abitrate-range` | - | Audio bitrate range in kbps, e.g. `128-256`. Mutually exclusive with `--abitrate`. |
|
| `-ab-range`, `--abitrate-range` | - | Audio bitrate range in kbps, e.g. `128-256`. Mutually exclusive with `--abitrate`. |
|
||||||
| `-r`, `--range` | `SDR` | Colour range(s): `SDR`, `HLG`, `HDR10`, `HDR10P` (HDR10+), `VIVID` (HDR Vivid), `DV`, `HYBRID`. |
|
| `-r`, `--range` | `SDR` | Colour range(s): `SDR`, `HLG`, `HDR10`, `HDR10P` (HDR10+), `VIVID` (HDR Vivid), `DV`, `HYBRID`. `HDR10+` and `"HDR Vivid"` also work. |
|
||||||
| `--generate-dv` | off | With `-r HYBRID`, make Dolby Vision from the HDR10+ metadata or the decoded video when a title has no Dolby Vision track. With `-r HDR10` or `-r HDR10P`, make it for that base and ignore a Dolby Vision track. See [Dolby Vision without a DV track](downloading.md#dolby-vision-without-a-dv-track). |
|
| `--generate-dv` | off | With `-r HYBRID`, make Dolby Vision from the HDR10+ metadata or the decoded video when a title has no Dolby Vision track. With `-r HDR10` or `-r HDR10P`, make it for that base and ignore a Dolby Vision track. See [Dolby Vision without a DV track](downloading.md#dolby-vision-without-a-dv-track). |
|
||||||
| `-c`, `--channels` | - | Audio channels; matches sub-layouts (5.1 ≈ 6.0). |
|
| `-c`, `--channels` | - | Audio channels, e.g. `5.1` or `2.0`; matches sub-layouts (5.1 ≈ 6.0). An immersive layout such as `5.1.4` matches its total number of channels (`-c 10`). |
|
||||||
| `-naa`, `--noatmos` | off | Exclude Dolby Atmos audio tracks. |
|
| `-naa`, `--noatmos` | off | Exclude Dolby Atmos audio tracks. |
|
||||||
| `--worst` | off | Pick the lowest-bitrate video at each requested resolution, or at the lowest resolution if none is set. |
|
| `--worst` | off | Pick the lowest-bitrate video at each requested resolution, or at the lowest resolution if none is set. |
|
||||||
| `--best-available`, `--warn-only` | off | Warn and continue when a requested resolution, range, video language, or audio language is absent, instead of failing. With `--all-drm`, also when one DRM system does not license. |
|
| `--best-available`, `--warn-only` | off | Warn and continue when a requested resolution, range, video language, or audio language is absent, instead of failing. With `--all-drm`, also when one DRM system does not license. |
|
||||||
| `-rvb`, `--real-video-bitrate` | off | Probe real media size for true video bitrates, overriding the manifest. |
|
| `-rvb`, `--real-video-bitrate` | off | Probe real media size for true video bitrates, overriding the manifest. |
|
||||||
| `-rab`, `--real-audio-bitrate` | off | Same for audio (slower). |
|
| `-rab`, `--real-audio-bitrate` | off | Same for audio (slower). |
|
||||||
|
|
||||||
|
#### Audio codec values
|
||||||
|
|
||||||
|
| Name | Value | Codec |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `AAC` | `AAC` | Advanced Audio Coding |
|
||||||
|
| `AC3` | `DD` | Dolby Digital |
|
||||||
|
| `EC3` | `DD+` | Dolby Digital Plus |
|
||||||
|
| `AC4` | `AC-4` | Dolby AC-4 |
|
||||||
|
| `OPUS` | `OPUS` | Opus |
|
||||||
|
| `OGG` | `VORB` | Vorbis |
|
||||||
|
| `DTS` | `DTS` | DTS |
|
||||||
|
| `DTSX` | `DTS-X` | DTS:X Profile 2 (DTS-UHD) |
|
||||||
|
| `DTSHD` | `DTS-HD` | DTS-HD High Resolution, Master Audio and Express |
|
||||||
|
| `MPEGH` | `MPEG-H` | MPEG-H 3D Audio |
|
||||||
|
| `AV3A` | `Audio Vivid` | Audio Vivid (AVS3-P3) |
|
||||||
|
| `ALAC` | `ALAC` | Apple Lossless |
|
||||||
|
| `FLAC` | `FLAC` | FLAC |
|
||||||
|
| `MP3` | `MP3` | MPEG-1 Audio Layer III |
|
||||||
|
| `PCM` | `PCM` | Pulse-code modulation |
|
||||||
|
|
||||||
!!! note "`HYBRID` range"
|
!!! note "`HYBRID` range"
|
||||||
`-r HYBRID` fetches both an HDR10/HDR10+/HDR Vivid base and Dolby Vision and merges them with `dovi_tool`. It requires the `dovi_tool` binary on your `PATH`.
|
`-r HYBRID` fetches both an HDR10/HDR10+/HDR Vivid base and Dolby Vision and merges them with `dovi_tool`. See [Colour range](downloading.md#colour-range) for what it needs.
|
||||||
|
|
||||||
### Language & subtitles
|
### Language & subtitles
|
||||||
|
|
||||||
@@ -105,11 +126,11 @@ unshackle dl [OPTIONS] SERVICE [SERVICE ARGS...]
|
|||||||
| `--skip-missing` | off | Skip a title that misses a required language or track, and continue with the next title. A run with one title, or a run that skips every title, still fails. |
|
| `--skip-missing` | off | Skip a title that misses a required language or track, and continue with the next title. A run with one title, or a run that skips every title, still fails. |
|
||||||
| `--skip-existing` | off | Skip a resolved video variant recorded in the completion archive. Does not verify that files still exist. |
|
| `--skip-existing` | off | Skip a resolved video variant recorded in the completion archive. Does not verify that files still exist. |
|
||||||
| `--force` | off | Bypass the completion archive check for this run; does not change overwrite behaviour. |
|
| `--force` | off | Bypass the completion archive check for this run; does not change overwrite behaviour. |
|
||||||
| `-fs`, `--forced-subs` | off | Include forced subtitle tracks. |
|
| `-fs`, `--forced-subs` | off | Include forced subtitle tracks. Without it, unshackle drops them. |
|
||||||
| `-fso`, `--forced-subs-only` | off | Keep only forced subtitle tracks; drop the other subtitles. Implies `-fs`. |
|
| `-fso`, `--forced-subs-only` | off | Keep only forced subtitle tracks; drop the other subtitles. Implies `-fs`. |
|
||||||
| `-fsl`, `--forced-s-lang` | none | Language(s) wanted for forced subtitles; implies `-fs`. A `-` prefix excludes. |
|
| `-fsl`, `--forced-s-lang` | none | Language(s) wanted for forced subtitles; implies `-fs`. A `-` prefix excludes. Independent of `--s-lang`: `-sl all -fsl en` keeps every full subtitle and only the English forced track. |
|
||||||
| `--exact-lang` | off | A tag without a region selects only the variant it means and never falls back to another: `-l es` does not select `es-419`. A tag with a region, such as `es-419`, is always exact. Applies to selection and to sort order. |
|
| `--exact-lang` | off | A tag without a region selects only the variant it means and never falls back to another: `-l es` does not select `es-419`. A tag with a region, such as `es-419`, is always exact. Applies to selection and to sort order. |
|
||||||
| `--sub-format` | - | Output subtitle format (`SRT`/`srt`, `VTT`/`webvtt`, `ASS`/`ssa`, `TTML`, `SMI`, ...), or `original` to keep the source format. |
|
| `--sub-format` | - | Output subtitle format, converted only when necessary: a subtitle codec name or value, case-insensitive (`SRT`, `VTT`/`webvtt`, `ASS`, `SSA`, `TTML`, `SMI`, ...), or `original` to keep the source format. |
|
||||||
| `--sub-font` | - | Font for subtitles converted to ASS, with the rest of the look from `subtitle.ass_style`. Implies `--sub-format ASS` and overrides a `sub_format` from the configuration file; a typed `--sub-format` of another format is an error. |
|
| `--sub-font` | - | Font for subtitles converted to ASS, with the rest of the look from `subtitle.ass_style`. Implies `--sub-format ASS` and overrides a `sub_format` from the configuration file; a typed `--sub-format` of another format is an error. |
|
||||||
|
|
||||||
!!! tip "These flags select languages, they do not order them"
|
!!! tip "These flags select languages, they do not order them"
|
||||||
@@ -126,10 +147,10 @@ unshackle honours the special language tokens `orig`, `all`, and `best` everywhe
|
|||||||
|---|---|
|
|---|---|
|
||||||
| `-w`, `--wanted` | Wanted episodes, e.g. `S01-S05,S07`, `S01E01-S02E03`. Supports exclusions with a leading `-` (e.g. `-S03`). For a [split episode](downloading.md#split-episodes), `.N` picks one part (`S01E01.2`), a range must stay inside the episode (`S01E01.1-S01E01.3`), and `S01E01` on its own takes every part. For a [dated episode](downloading.md#daily-and-date-based-content), a token can also be an ISO air date (`2026-08-11`) or a date range with a colon (`2026-08-01:2026-08-31`). For a [music release](downloading.md#music-tracks), a token is a number of the track list (`1-5`, `1,3,7`), or `{disc}x{track}` (`2x3`) when the release has more than one disc. |
|
| `-w`, `--wanted` | Wanted episodes, e.g. `S01-S05,S07`, `S01E01-S02E03`. Supports exclusions with a leading `-` (e.g. `-S03`). For a [split episode](downloading.md#split-episodes), `.N` picks one part (`S01E01.2`), a range must stay inside the episode (`S01E01.1-S01E01.3`), and `S01E01` on its own takes every part. For a [dated episode](downloading.md#daily-and-date-based-content), a token can also be an ISO air date (`2026-08-11`) or a date range with a colon (`2026-08-01:2026-08-31`). For a [music release](downloading.md#music-tracks), a token is a number of the track list (`1-5`, `1,3,7`), or `{disc}x{track}` (`2x3`) when the release has more than one disc. |
|
||||||
| `--select-titles` | Interactively select what to download: episodes of a series, or films when a title has more than one. **Cannot combine with `-w`.** |
|
| `--select-titles` | Interactively select what to download: episodes of a series, or films when a title has more than one. **Cannot combine with `-w`.** |
|
||||||
| `--latest-episode` | Download only the single most recent episode. |
|
| `--latest-episode` | Download only the single most recent episode. `-w` has no effect with it. |
|
||||||
| `--latest-episodes N` | Download only the N most recent episodes. |
|
| `--latest-episodes N` | Download only the N most recent episodes, which can come from more than one season. A split episode counts as one episode, and all its parts download. `-w` has no effect with it. |
|
||||||
| `--max-downloads N` | Stop after N titles have downloaded. A skipped title, or a title already in the completion archive, does not count. |
|
| `--max-downloads N` | Stop after N titles have downloaded. A skipped title, or a title already in the completion archive, does not count. With `--skip-dl` or `--no-mux`, a title counts when its run completes. Each part of a split episode counts as one title. unshackle does not open the titles after the limit. |
|
||||||
| `--list-titles` | List titles only; do not download. |
|
| `--list-titles` | List every title the service returned, then stop. `-w`, `--latest-episode` and `--latest-episodes` do not apply to this list. |
|
||||||
|
|
||||||
### Track-type inclusion / exclusion
|
### Track-type inclusion / exclusion
|
||||||
|
|
||||||
@@ -145,7 +166,7 @@ Keep only certain track types, or skip certain track types.
|
|||||||
|
|
||||||
| Flag | Description |
|
| Flag | Description |
|
||||||
|---|---|
|
|---|---|
|
||||||
| `-ad`, `--audio-description` | Include descriptive (audio-description) tracks. |
|
| `-ad`, `--audio-description` | Include descriptive (audio-description) tracks. Without it, unshackle drops them. |
|
||||||
| `-ado`, `--audio-description-only` | Keep only descriptive (audio-description) tracks; drop the standard audio. Does not need `-ad`. |
|
| `-ado`, `--audio-description-only` | Keep only descriptive (audio-description) tracks; drop the standard audio. Does not need `-ad`. |
|
||||||
| `--skip-subtitle-errors` | Skip a failed subtitle instead of aborting the title. Video/audio failures remain fatal. |
|
| `--skip-subtitle-errors` | Skip a failed subtitle instead of aborting the title. Video/audio failures remain fatal. |
|
||||||
|
|
||||||
@@ -156,7 +177,7 @@ Keep only certain track types, or skip certain track types.
|
|||||||
| `--split-audio` | Write a separate output file per audio codec instead of merging. Defaults to config `muxing.merge_audio`. |
|
| `--split-audio` | Write a separate output file per audio codec instead of merging. Defaults to config `muxing.merge_audio`. |
|
||||||
| `--merge-video` | Mux video tracks that share a height, range, and codec into one file, so only language varies inside a file. Defaults to config `muxing.merge_video`. |
|
| `--merge-video` | Mux video tracks that share a height, range, and codec into one file, so only language varies inside a file. Defaults to config `muxing.merge_video`. |
|
||||||
| `-o`, `--output` | Override the output directory for this run. |
|
| `-o`, `--output` | Override the output directory for this run. |
|
||||||
| `--no-folder` | Disable folder creation for TV shows. |
|
| `--no-folder` | Write the files directly in the output directory, with no folder for the title. Applies to every kind of title. |
|
||||||
| `--no-source` | Remove the source tag from the filename/path. |
|
| `--no-source` | Remove the source tag from the filename/path. |
|
||||||
| `--no-mux` | Do not mux; keep individual track files. |
|
| `--no-mux` | Do not mux; keep individual track files. |
|
||||||
| `--sample` | Download a short sample and write it with a `SAMPLE` tag on the filename in a `Sample` folder inside the output folder. Bare `--sample` = 60 seconds from 2 minutes in; `--sample 0-60` = a custom window in seconds. |
|
| `--sample` | Download a short sample and write it with a `SAMPLE` tag on the filename in a `Sample` folder inside the output folder. Bare `--sample` = 60 seconds from 2 minutes in; `--sample 0-60` = a custom window in seconds. |
|
||||||
@@ -176,37 +197,26 @@ Keep only certain track types, or skip certain track types.
|
|||||||
| `--anilist` | AniList ID (integer), e.g. `--anilist 21`. A MyAnimeList ID is accepted as `mal:12345` and resolved to the AniList entry. Used for the tags. Skips the title search. `--enrich` reads it too. Needs no API key. |
|
| `--anilist` | AniList ID (integer), e.g. `--anilist 21`. A MyAnimeList ID is accepted as `mal:12345` and resolved to the AniList entry. Used for the tags. Skips the title search. `--enrich` reads it too. Needs no API key. |
|
||||||
| `--enrich` | Overwrite show title, year and original language with the external source's. **Requires** one of `--tmdb`, `--imdb`, `--tvdb`, or `--anilist`. |
|
| `--enrich` | Overwrite show title, year and original language with the external source's. **Requires** one of `--tmdb`, `--imdb`, `--tvdb`, or `--anilist`. |
|
||||||
| `--daily` | Treat the title as daily/date-based content and fill missing episode air dates from TVDB. The fill needs `--enrich` and a TVDB ID. See [Daily and date-based content](downloading.md#daily-and-date-based-content). |
|
| `--daily` | Treat the title as daily/date-based content and fill missing episode air dates from TVDB. The fill needs `--enrich` and a TVDB ID. See [Daily and date-based content](downloading.md#daily-and-date-based-content). |
|
||||||
| `--tvdb-order` | Renumber episodes to a TVDB season order: `official` (aired), `dvd`, `absolute`, `alternate`, or `regional`. Needs `tvdb_api_key`. |
|
| `--tvdb-order` | Renumber episodes to a TVDB season order: `official` (aired), `dvd`, `absolute`, `alternate`, or `regional`. Needs `tvdb_api_key`. See [Episode ordering](downloading.md#episode-ordering). |
|
||||||
| `-ce` / `--continuous-episodes` | Number each season on from the season before it. After a season one of four episodes, season two starts at `S02E05`. Season 0 and episode 0 keep their numbers. |
|
| `-ce` / `--continuous-episodes` | Number each season on from the season before it. After a season one of four episodes, season two starts at `S02E05`. Season 0 and episode 0 keep their numbers. |
|
||||||
|
|
||||||
!!! note "One ID at a time"
|
!!! note "One ID at a time"
|
||||||
You cannot combine `--tmdb`, `--imdb` and `--tvdb`. Give one and unshackle finds the
|
You cannot combine `--tmdb`, `--imdb` and `--tvdb`. Give one and unshackle finds the
|
||||||
others from it, and writes all three to the tags. `--anilist` is outside that rule and pairs
|
others from it, and writes all three to the tags. `--anilist` is outside that rule and pairs
|
||||||
with one of them, which is how you set the western ID of an anime title yourself.
|
with one of them, which is how you set the western ID of an anime title yourself.
|
||||||
An ID with no metadata provider that can find it, such as `--tmdb` with no `tmdb_api_key`,
|
An ID with no metadata provider that can find it, such as `--tmdb` with no `tmdb_api_key`
|
||||||
fails before the download starts. `--anilist` needs no API key, so it never fails this check.
|
or an ID whose providers `metadata_providers` leaves out, fails before the download starts. `--anilist` needs no API key, so it never fails this check.
|
||||||
|
|
||||||
#### Episode ordering
|
|
||||||
|
|
||||||
A service does not always number a series the way TVDB's aired order does. Some services use
|
|
||||||
TVDB's `alternate` (Streaming) order for Futurama, for example. `--tvdb-order` works out which
|
|
||||||
order the service used, then renumbers the episodes into the order you asked for.
|
|
||||||
|
|
||||||
!!! note "Orders that do not cover the whole series"
|
|
||||||
An order can ignore episodes the service carries. TVDB's `dvd` order for Futurama leaves
|
|
||||||
out the four movies. Those episodes keep their original numbering. If that would give two
|
|
||||||
episodes the same season/episode slot, and so the same filename, unshackle logs an error
|
|
||||||
and keeps the service's numbering unchanged. Pick an order that covers the whole series.
|
|
||||||
|
|
||||||
### DRM, keys & decryption
|
### DRM, keys & decryption
|
||||||
|
|
||||||
| Flag | Description |
|
| Flag | Description |
|
||||||
|---|---|
|
|---|---|
|
||||||
| `--cdm-only` / `--vaults-only` | Use only the CDM, or only Key Vaults, for key acquisition. |
|
| `--cdm-only` | Read no key vault, and get each content key that the run does not already hold from a licence. Over `--remote`, your own CDM licenses each track, and the run uses neither the server CDM nor the server vault. A run with no local CDM fails, and so does a remote session on the server's device. |
|
||||||
| `--cdm <name>` | Use the named CDM device from the `cdm` config mapping for this run, ignoring the service/default mapping. Over `--remote`, that device licenses the remote session, not the server CDM. |
|
| `--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. |
|
| `--skip-dl` | Skip the download but still retrieve keys. |
|
||||||
| `--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`. |
|
| `--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` | Export track info and keys to a `mediaexport` JSON file in the exports directory. |
|
| `--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. |
|
||||||
|
|
||||||
### Network & proxy
|
### Network & proxy
|
||||||
|
|
||||||
@@ -227,14 +237,14 @@ order the service used, then renumbers the episodes into the order you asked for
|
|||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `--workers` | downloader default | Per-track download threads. |
|
| `--workers` | downloader default | Per-track download threads. |
|
||||||
| `--adaptive-workers` | off | Scale per-track segment workers dynamically (up to the `--workers` cap) based on measured CDN throughput and errors. |
|
| `--adaptive-workers` | off | Scale per-track segment workers dynamically (up to the `--workers` cap) based on measured CDN throughput and errors. |
|
||||||
| `--download-processes` | `1` | Split large segment batches (24+) across this many download processes to exceed the single-process throughput cap on multi-gigabit connections. Ignored while a speed limit is set: the cap is one shared budget, which extra processes cannot share, so the download stays in a single process. Also ignored when the service HTTP session carries state a child process cannot rebuild, such as a custom TLS adapter. |
|
| `--download-processes` | `1` | Split a batch of 24 or more segments across this many download processes, which share the `--workers` threads. One process tops out at about 1.3 Gb/s; `2` reaches 2.5GbE line rate on a fast CDN. Ignored while a speed limit is set (`--speed-limit`, or the share of `global_speed_limit` that `serve` gives a job): the limit is one budget for every thread of the process, which child processes cannot share. Also ignored when the service HTTP session carries state a child process cannot rebuild, such as a custom TLS adapter. |
|
||||||
| `--continue-downloads` | off | Keep completed segment files across runs and resume a previously failed download. One-off enable of the [`continue_downloads`](../reference/configuration/download.md#continue_downloads) config option. |
|
| `--continue-downloads` | off | Keep completed segment files across runs and resume a previously failed download. One-off enable of the [`continue_downloads`](../reference/configuration/download.md#continue_downloads) config option. |
|
||||||
| `--downloads` | `1` | Number of tracks downloaded concurrently. |
|
| `--downloads` | `1` | Number of tracks downloaded concurrently. |
|
||||||
| `--speed-limit` | unlimited | Cap total download speed across all threads and tracks, e.g. `500k`, `5M`, `1.5G` or plain bytes/sec. Values are bytes, not bits (`5M` = 5.0 MB/s). `off` disables a configured limit. |
|
| `--speed-limit` | unlimited | Cap total download speed across all threads and tracks, e.g. `500k`, `5M`, `1.5G` or plain bytes/sec. Values are bytes, not bits (`5M` = 5.0 MB/s). `off` disables a configured limit. |
|
||||||
| `--no-cache` | off | Bypass the title cache. |
|
| `--no-cache` | off | Bypass the title cache. |
|
||||||
| `--reset-cache` | off | Clear the title cache. |
|
| `--reset-cache` | off | Clear the title cache. |
|
||||||
| `--list` | off | List available/would-be-downloaded tracks; do not download. |
|
| `--list` | off | List the tracks of each title, then stop before track selection. |
|
||||||
| `--slow` | - | Inter-title delay. Bare `--slow` = 60-120s; `--slow 20-40` = custom range (minimum 20s). |
|
| `--slow` | - | Delay between titles. Bare `--slow` = 60-120 s; `--slow MIN-MAX` (e.g. `--slow 20-40`) = a custom range in seconds, with MIN at least 5 and not more than MAX. |
|
||||||
|
|
||||||
!!! warning "Some flags cannot be combined"
|
!!! warning "Some flags cannot be combined"
|
||||||
`--select-titles` and `--wanted` are mutually exclusive. `--vbitrate` and `--vbitrate-range` (and the audio equivalents) are mutually exclusive.
|
`--select-titles` and `--wanted` are mutually exclusive. `--vbitrate` and `--vbitrate-range` (and the audio equivalents) are mutually exclusive.
|
||||||
@@ -266,8 +276,7 @@ unshackle logs in to the service before the search. A service that declares a se
|
|||||||
| `--local` | Search with the local service code, also when the config sets `remote: true` for the service. |
|
| `--local` | Search with the local service code, also when the config sets `remote: true` for the service. |
|
||||||
| `--server` | Name a remote server from the `remote_services` config. |
|
| `--server` | Name a remote server from the `remote_services` config. |
|
||||||
|
|
||||||
!!! example
|
```shell title="search examples"
|
||||||
```shell
|
|
||||||
unshackle search EXAMPLE "My Show"
|
unshackle search EXAMPLE "My Show"
|
||||||
unshackle search -p myprofile EXAMPLE "Another Show"
|
unshackle search -p myprofile EXAMPLE "Another Show"
|
||||||
unshackle search --proxy nordvpn:ca SERVICE "query"
|
unshackle search --proxy nordvpn:ca SERVICE "query"
|
||||||
@@ -286,13 +295,12 @@ unshackle import EXPORT_FILE [DL_ARGS...]
|
|||||||
|
|
||||||
unshackle forwards any `dl` options after the file verbatim, so you can override quality, range, proxy, and so on. The import selects tracks with the `dl` defaults, not with the selection of the export. Give the selection options of the export again, for example `-r HYBRID` for an export of HDR tracks.
|
unshackle forwards any `dl` options after the file verbatim, so you can override quality, range, proxy, and so on. The import selects tracks with the `dl` defaults, not with the selection of the export. Give the selection options of the export again, for example `-r HYBRID` for an export of HDR tracks.
|
||||||
|
|
||||||
!!! example
|
```shell title="import examples"
|
||||||
```shell
|
|
||||||
unshackle import export.json
|
unshackle import export.json
|
||||||
unshackle import export.json -r HDR10 --proxy US
|
unshackle import export.json -r HDR10 --proxy US
|
||||||
```
|
```
|
||||||
|
|
||||||
The export file can be a `mediaexport` file from `dl --export`, an export from an older version of unshackle, or an export from unidl. The file must name the service it came from.
|
The export file can be an export from `dl --export`, an export from an older version of unshackle, or an export from unidl. The file must name the service it came from.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -325,8 +333,7 @@ unshackle setup
|
|||||||
|
|
||||||
The command takes no options and asks its questions at the prompt. It shows the missing [external tools](../getting-started/installation.md#external-tools-on-your-path) and downloads the ones you accept. It puts them in a `binaries` folder, in the package folder of a git clone or in your user data directory for a `uv` tool install. If no `unshackle.yaml` exists, it writes a first one: inside the clone, or to your user config directory for a `uv` tool install. It then makes the data folders and imports `.wvd` and `.prd` devices, one file or folder per answer, until you give an empty answer. It ends with a summary of the tools, the path of a config that it wrote, and a pointer to `env check`. You can run it again: it skips the tools it finds and never overwrites a config. [Installation](../getting-started/installation.md#what-unshackle-setup-does) gives the full steps and where each file goes.
|
The command takes no options and asks its questions at the prompt. It shows the missing [external tools](../getting-started/installation.md#external-tools-on-your-path) and downloads the ones you accept. It puts them in a `binaries` folder, in the package folder of a git clone or in your user data directory for a `uv` tool install. If no `unshackle.yaml` exists, it writes a first one: inside the clone, or to your user config directory for a `uv` tool install. It then makes the data folders and imports `.wvd` and `.prd` devices, one file or folder per answer, until you give an empty answer. It ends with a summary of the tools, the path of a config that it wrote, and a pointer to `env check`. You can run it again: it skips the tools it finds and never overwrites a config. [Installation](../getting-started/installation.md#what-unshackle-setup-does) gives the full steps and where each file goes.
|
||||||
|
|
||||||
!!! example
|
```shell title="setup examples"
|
||||||
```shell
|
|
||||||
uv run unshackle setup # from a git clone
|
uv run unshackle setup # from a git clone
|
||||||
unshackle setup # from a uv tool install
|
unshackle setup # from a uv tool install
|
||||||
```
|
```
|
||||||
@@ -351,8 +358,7 @@ unshackle cfg [KEY] [VALUE] [OPTIONS]
|
|||||||
!!! warning "Comments are stripped"
|
!!! warning "Comments are stripped"
|
||||||
Writing a value through `cfg` rewrites the configuration file and **removes all comments** from it. If your config relies on comments, edit it by hand instead. Setting a value and using `--unset` together is an error. If a config key is set twice in the same block, every command warns with the line numbers of the two copies and uses the later copy. `cfg` stops without a change.
|
Writing a value through `cfg` rewrites the configuration file and **removes all comments** from it. If your config relies on comments, edit it by hand instead. Setting a value and using `--unset` together is an error. If a config key is set twice in the same block, every command warns with the line numbers of the two copies and uses the later copy. `cfg` stops without a change.
|
||||||
|
|
||||||
!!! example
|
```shell title="cfg examples"
|
||||||
```shell
|
|
||||||
unshackle cfg --list # print entire config
|
unshackle cfg --list # print entire config
|
||||||
unshackle cfg serve.api_secret # read a nested key
|
unshackle cfg serve.api_secret # read a nested key
|
||||||
unshackle cfg tag MYGROUP # set a string
|
unshackle cfg tag MYGROUP # set a string
|
||||||
@@ -419,8 +425,7 @@ Clear an environment directory. unshackle empties the directory, makes it again,
|
|||||||
| `unshackle env clear cache [SERVICE]` | Clear the cache directory, or only one service's cache subdirectory. |
|
| `unshackle env clear cache [SERVICE]` | Clear the cache directory, or only one service's cache subdirectory. |
|
||||||
| `unshackle env clear temp` | Clear the temp directory. |
|
| `unshackle env clear temp` | Clear the temp directory. |
|
||||||
|
|
||||||
!!! example
|
```shell title="env examples"
|
||||||
```shell
|
|
||||||
unshackle env check
|
unshackle env check
|
||||||
unshackle env info
|
unshackle env info
|
||||||
unshackle env theme
|
unshackle env theme
|
||||||
@@ -433,7 +438,7 @@ Clear an environment directory. unshackle empties the directory, makes it again,
|
|||||||
|
|
||||||
## `kv`
|
## `kv`
|
||||||
|
|
||||||
Manage Key Vaults. You configure vaults under `key_vaults` in `unshackle.yaml`, each with a `name`, a `type` (`sqlite`, `mysql`, `http`, `api`), and type-specific options. unshackle normalises service tags automatically.
|
Manage Key Vaults. You configure vaults under [`key_vaults`](../reference/configuration/vaults.md) in `unshackle.yaml`. unshackle normalises service tags automatically.
|
||||||
|
|
||||||
```
|
```
|
||||||
unshackle kv COMMAND [ARGS]...
|
unshackle kv COMMAND [ARGS]...
|
||||||
@@ -460,7 +465,7 @@ Add content keys to one or more vaults for a service. `FILE` contains one `KID:K
|
|||||||
|
|
||||||
### `kv search KID`
|
### `kv search KID`
|
||||||
|
|
||||||
Find a KID (32 hex characters, no dashes) in the configured vaults and report its content key.
|
Find a KID (32 hex characters; unshackle removes dashes) in the configured vaults and report its content key.
|
||||||
|
|
||||||
| Option | Description |
|
| Option | Description |
|
||||||
|---|---|
|
|---|---|
|
||||||
@@ -474,8 +479,7 @@ Find a KID (32 hex characters, no dashes) in the configured vaults and report it
|
|||||||
|
|
||||||
Make service tables on vaults that use tables, for every installed service, where they do not already exist.
|
Make service tables on vaults that use tables, for every installed service, where they do not already exist.
|
||||||
|
|
||||||
!!! example
|
```shell title="kv examples"
|
||||||
```shell
|
|
||||||
unshackle kv copy main backup1 backup2
|
unshackle kv copy main backup1 backup2
|
||||||
unshackle kv copy main backup -s EXAMPLE
|
unshackle kv copy main backup -s EXAMPLE
|
||||||
unshackle kv copy main ~/Downloads/key_store.db -s EXAMPLE
|
unshackle kv copy main ~/Downloads/key_store.db -s EXAMPLE
|
||||||
@@ -511,8 +515,7 @@ unshackle wvd COMMAND [ARGS]...
|
|||||||
| `-l`, `--level` | `1` | Security level (1-3). |
|
| `-l`, `--level` | `1` | Security level (1-3). |
|
||||||
| `-o`, `--output` | WVDs dir | Output directory. |
|
| `-o`, `--output` | WVDs dir | Output directory. |
|
||||||
|
|
||||||
!!! example
|
```shell title="wvd examples"
|
||||||
```shell
|
|
||||||
unshackle wvd add device.wvd
|
unshackle wvd add device.wvd
|
||||||
unshackle wvd parse nexus_6p_1234_l1
|
unshackle wvd parse nexus_6p_1234_l1
|
||||||
unshackle wvd dump device.wvd ./out_dir
|
unshackle wvd dump device.wvd ./out_dir
|
||||||
@@ -564,8 +567,7 @@ Write the group key (`zgpriv.dat`) and the group certificate (`bgroupcert.dat`)
|
|||||||
|
|
||||||
Show each certificate of a certificate chain: type, security level, expiry date, name, features and keys. Give `-d` with a `.prd` file, or `-c` with a chain file such as `bgroupcert.dat`.
|
Show each certificate of a certificate chain: type, security level, expiry date, name, features and keys. Give `-d` with a `.prd` file, or `-c` with a chain file such as `bgroupcert.dat`.
|
||||||
|
|
||||||
!!! example
|
```shell title="prd examples"
|
||||||
```shell
|
|
||||||
unshackle prd new ./device_folder/
|
unshackle prd new ./device_folder/
|
||||||
unshackle prd new zgpriv.dat bgroupcert.dat -o /out/dir
|
unshackle prd new zgpriv.dat bgroupcert.dat -o /out/dir
|
||||||
unshackle prd reprovision mydevice.prd
|
unshackle prd reprovision mydevice.prd
|
||||||
@@ -612,8 +614,7 @@ WVD files in the WVDs directory and PRD files in the PRDs directory are auto-loa
|
|||||||
username: user
|
username: user
|
||||||
```
|
```
|
||||||
|
|
||||||
!!! example
|
```shell title="serve examples"
|
||||||
```shell
|
|
||||||
unshackle serve
|
unshackle serve
|
||||||
unshackle serve -h 0.0.0.0 -p 8080
|
unshackle serve -h 0.0.0.0 -p 8080
|
||||||
unshackle serve --api-only
|
unshackle serve --api-only
|
||||||
@@ -666,8 +667,7 @@ Decode an entire video with FFmpeg and report any corruptions or errors. By defa
|
|||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `-m`, `--map` | `0` | Do a test of specific tracks with FFmpeg's `-map`, for example `0:v:0` or `0:a`. |
|
| `-m`, `--map` | `0` | Do a test of specific tracks with FFmpeg's `-map`, for example `0:v:0` or `0:a`. |
|
||||||
|
|
||||||
!!! example
|
```shell title="util examples"
|
||||||
```shell
|
|
||||||
unshackle util refresh-services
|
unshackle util refresh-services
|
||||||
unshackle util crop video.mkv 2.39:1
|
unshackle util crop video.mkv 2.39:1
|
||||||
unshackle util crop ./season/ 16:9 --pillar -o 10
|
unshackle util crop ./season/ 16:9 --pillar -o 10
|
||||||
|
|||||||
+82
-289
@@ -1,17 +1,14 @@
|
|||||||
# Downloading
|
# Downloading
|
||||||
|
|
||||||
`unshackle dl` is the main download command: it fetches a title's manifest from a
|
`unshackle dl` is the main download command: it fetches a title's manifest from a
|
||||||
streaming service, selects exactly the tracks you asked for, acquires and applies
|
streaming service, selects exactly the tracks you asked for, gets and applies the
|
||||||
decryption keys, and muxes everything into a finished Matroska file. The flags below
|
content keys, and muxes everything into a finished Matroska file. This page shows how
|
||||||
cover quality and codec selection, language and subtitle handling, episode ranges, and
|
to do common download tasks and how the flags work together.
|
||||||
the download flow itself.
|
|
||||||
|
|
||||||
!!! note "Where the full flag list lives"
|
!!! note "Where each flag is described"
|
||||||
This page covers the flags you will use most and explains how they interact. It is
|
The [CLI reference](cli-reference.md#dl) describes each `dl` flag and its default, and
|
||||||
not an exhaustive enumeration. For the complete, always-current list of every option
|
`unshackle dl --help` gives a short description of each. To give a flag a default in your
|
||||||
and its exact wording, use `unshackle dl --help`. Every flag shown here can also be
|
configuration file, use the [`dl`](../reference/configuration/download.md#dl) block.
|
||||||
given a default in your configuration file. See
|
|
||||||
[Configuration file](../getting-started/configuration-file.md).
|
|
||||||
|
|
||||||
## Command shape
|
## Command shape
|
||||||
|
|
||||||
@@ -59,14 +56,16 @@ with `--skip-dl`.
|
|||||||
5. **Get tracks**: parse the manifest into video, audio, subtitle, and chapter tracks.
|
5. **Get tracks**: parse the manifest into video, audio, subtitle, and chapter tracks.
|
||||||
6. **Select tracks**: narrow each type down using your quality, codec, range, language,
|
6. **Select tracks**: narrow each type down using your quality, codec, range, language,
|
||||||
and bitrate flags.
|
and bitrate flags.
|
||||||
7. **Download**: pull segments for the selected tracks (concurrently per `--downloads`).
|
7. **Licence**: get the content keys of each selected track, in the
|
||||||
8. **License & decrypt**: get the content keys (vault → CDM), decrypt each track.
|
[key order](drm-and-cdm.md#keys-vaults-and-caching).
|
||||||
|
8. **Download & decrypt**: pull the segments of the selected tracks (concurrently per
|
||||||
|
`--downloads`), merge them, and decrypt each track.
|
||||||
9. **Post-process**: extract closed captions, convert subtitles, repack, mux with
|
9. **Post-process**: extract closed captions, convert subtitles, repack, mux with
|
||||||
`mkvmerge`, and move the finished file to your downloads directory.
|
`mkvmerge`, and move the finished file to your downloads directory.
|
||||||
|
|
||||||
`--list` prints the tracks a title exposes and stops before selection. `--list-titles`
|
`--list` prints the tracks a title exposes and stops before selection. `--list-titles`
|
||||||
prints every title the service returned and stops before `--wanted`/`--latest-episode`/`--latest-episodes`
|
prints every title the service returned and stops before `--wanted`/`--latest-episode`/`--latest-episodes`
|
||||||
filtering. `--skip-dl` runs the license step but skips the actual segment download.
|
filtering. `--skip-dl` runs the licence step but skips the segment download.
|
||||||
|
|
||||||
## Choosing quality
|
## Choosing quality
|
||||||
|
|
||||||
@@ -96,12 +95,10 @@ unshackle dl -q 2160,1080,720 EXAMPLE 81234567
|
|||||||
|
|
||||||
### Best-available and worst
|
### Best-available and worst
|
||||||
|
|
||||||
By default a missing requested resolution is an error. Two flags change that:
|
By default a missing requested resolution is an error.
|
||||||
|
[`--best-available` and `--worst`](cli-reference.md#quality-codec-bitrate-range) change that:
|
||||||
| Flag | Behaviour |
|
the first continues with the best resolution that is available, and the second picks the
|
||||||
| --- | --- |
|
lowest-bitrate video.
|
||||||
| `--best-available` (`--warn-only`) | If the requested resolution(s) are not present, continue with the best that *is* available instead of failing. Also softens missing video and audio languages and hybrid fallbacks, and with `--all-drm` a DRM system that does not license. |
|
|
||||||
| `--worst` | Pick the lowest-bitrate video at each requested resolution. With no requested resolution, pick the lowest-bitrate video at the lowest resolution. |
|
|
||||||
|
|
||||||
A `quality` in the config counts as a requested resolution. When `--best-available` finds none of the
|
A `quality` in the config counts as a requested resolution. When `--best-available` finds none of the
|
||||||
requested resolutions, `--worst` also picks from the lowest resolution. In hybrid mode, that is the
|
requested resolutions, `--worst` also picks from the lowest resolution. In hybrid mode, that is the
|
||||||
@@ -115,24 +112,8 @@ unshackle dl -q 2160 --best-available EXAMPLE 0ABC123
|
|||||||
|
|
||||||
### Codec
|
### Codec
|
||||||
|
|
||||||
`-v` / `--vcodec` selects one or more video codecs. The default is any codec. It accepts
|
[`-v` / `--vcodec`](cli-reference.md#quality-codec-bitrate-range) selects one or more video codecs,
|
||||||
either enum **names** or their **values**, comma-separated.
|
comma-separated, by name (`HEVC`) or by value (`H.265`). The default is any codec.
|
||||||
|
|
||||||
| Name | Value |
|
|
||||||
| --- | --- |
|
|
||||||
| `AVC` | `H.264` |
|
|
||||||
| `HEVC` | `H.265` |
|
|
||||||
| `VVC` | `H.266` |
|
|
||||||
| `VC1` | `VC-1` |
|
|
||||||
| `VP8` | `VP8` |
|
|
||||||
| `VP9` | `VP9` |
|
|
||||||
| `AV1` | `AV1` |
|
|
||||||
| `LCEVC` | `LCEVC` |
|
|
||||||
|
|
||||||
`H264`, `H265` and `H266` are aliases of `AVC`, `HEVC` and `VVC`.
|
|
||||||
|
|
||||||
An LCEVC (MPEG-5 Part 2) track only adds detail on top of its base video track and cannot play
|
|
||||||
alone, so unshackle selects it only when you ask for it with `-v LCEVC`.
|
|
||||||
|
|
||||||
```shell title="Either spelling works"
|
```shell title="Either spelling works"
|
||||||
unshackle dl -v HEVC EXAMPLE 81234567
|
unshackle dl -v HEVC EXAMPLE 81234567
|
||||||
@@ -142,17 +123,9 @@ unshackle dl -v hevc,avc EXAMPLE 81234567
|
|||||||
|
|
||||||
### Colour range
|
### Colour range
|
||||||
|
|
||||||
`-r` / `--range` selects one or more colour ranges. The default is `SDR`.
|
[`-r` / `--range`](cli-reference.md#quality-codec-bitrate-range) selects one or more colour ranges.
|
||||||
|
The default is `SDR`. `HYBRID` fetches both an HDR10/HDR10+/HDR Vivid base and a DV track,
|
||||||
| Range | Meaning |
|
then merges them.
|
||||||
| --- | --- |
|
|
||||||
| `SDR` | Standard dynamic range (default) |
|
|
||||||
| `HLG` | Hybrid Log-Gamma |
|
|
||||||
| `HDR10` | HDR10 |
|
|
||||||
| `HDR10P` | HDR10+ (`-r HDR10+` also works) |
|
|
||||||
| `VIVID` | HDR Vivid (`-r "HDR Vivid"` also works) |
|
|
||||||
| `DV` | Dolby Vision |
|
|
||||||
| `HYBRID` | Fetch both an HDR10/HDR10+/HDR Vivid base and a DV track, then merge them |
|
|
||||||
|
|
||||||
```shell title="Grab HDR10 and Dolby Vision in one run"
|
```shell title="Grab HDR10 and Dolby Vision in one run"
|
||||||
unshackle dl -q 2160 -r HDR10,DV EXAMPLE '...'
|
unshackle dl -q 2160 -r HDR10,DV EXAMPLE '...'
|
||||||
@@ -273,18 +246,9 @@ measured for each pixel.
|
|||||||
By default unshackle keeps the highest-bitrate rendition for each selected
|
By default unshackle keeps the highest-bitrate rendition for each selected
|
||||||
resolution/codec/range/language combination. One requested video language is one
|
resolution/codec/range/language combination. One requested video language is one
|
||||||
language here, also when it matches more than one regional tag (`en` can match
|
language here, also when it matches more than one regional tag (`en` can match
|
||||||
`en-AU` and `en-GB`). You can constrain this.
|
`en-AU` and `en-GB`). To pick a different bitrate, give an exact bitrate (`-vb`, `-ab`)
|
||||||
|
or a bitrate range (`-vb-range`, `-ab-range`); the
|
||||||
| Flag | Purpose |
|
[CLI reference](cli-reference.md#quality-codec-bitrate-range) describes each.
|
||||||
| --- | --- |
|
|
||||||
| `-vb` / `--vbitrate` | Exact video bitrate in kbps. |
|
|
||||||
| `-ab` / `--abitrate` | Exact audio bitrate in kbps. |
|
|
||||||
| `-vb-range` / `--vbitrate-range` | Video bitrate range in kbps, e.g. `6000-7000`; picks the highest within it. |
|
|
||||||
| `-ab-range` / `--abitrate-range` | Audio bitrate range in kbps, e.g. `128-256`. |
|
|
||||||
|
|
||||||
!!! warning "Exact vs range are mutually exclusive"
|
|
||||||
You cannot combine `--vbitrate` with `--vbitrate-range`, and likewise for the audio
|
|
||||||
pair. Pick one form.
|
|
||||||
|
|
||||||
### Real bitrate probing
|
### Real bitrate probing
|
||||||
|
|
||||||
@@ -292,12 +256,10 @@ Manifest-declared bitrates are sometimes rounded or wrong. Services often advert
|
|||||||
**peak** or **nominal** bandwidth that is far from the track's real average. This matters
|
**peak** or **nominal** bandwidth that is far from the track's real average. This matters
|
||||||
because a track's bitrate drives the track listing, the sort order, *and* the
|
because a track's bitrate drives the track listing, the sort order, *and* the
|
||||||
`--vbitrate`/`--vbitrate-range` selection above. A bogus declared value therefore makes
|
`--vbitrate`/`--vbitrate-range` selection above. A bogus declared value therefore makes
|
||||||
unshackle pick the wrong track. These flags probe the actual media size to compute a true
|
unshackle pick the wrong track.
|
||||||
bitrate for the top renditions, overriding the manifest value:
|
[`-rvb` and `-rab`](cli-reference.md#quality-codec-bitrate-range) probe the media size to calculate
|
||||||
|
the real bitrate of the top video and audio renditions, and override the manifest value. The
|
||||||
- `-rvb` / `--real-video-bitrate`: probe real video bitrates (per codec/range).
|
audio probe is slower, because there are more audio renditions to probe.
|
||||||
- `-rab` / `--real-audio-bitrate`: probe real audio bitrates (per codec/channels/
|
|
||||||
language). Slower than the video variant because there are more renditions to probe.
|
|
||||||
|
|
||||||
!!! note "Reading the probed numbers"
|
!!! note "Reading the probed numbers"
|
||||||
unshackle measures a single-file track (DASH `SegmentBase`/`BaseURL`) **exactly**. A
|
unshackle measures a single-file track (DASH `SegmentBase`/`BaseURL`) **exactly**. A
|
||||||
@@ -321,27 +283,9 @@ bitrate for the top renditions, overriding the manifest value:
|
|||||||
|
|
||||||
### Codec
|
### Codec
|
||||||
|
|
||||||
`-a` / `--acodec` selects one or more audio codecs (comma-separated). The default is any.
|
[`-a` / `--acodec`](cli-reference.md#quality-codec-bitrate-range) selects one or more audio codecs,
|
||||||
|
comma-separated, by name, value or alias from the [audio codec values](cli-reference.md#audio-codec-values).
|
||||||
| Name | Value | Codec |
|
The default is any.
|
||||||
| --- | --- | --- |
|
|
||||||
| `AAC` | `AAC` | Advanced Audio Coding |
|
|
||||||
| `AC3` | `DD` | Dolby Digital |
|
|
||||||
| `EC3` | `DD+` | Dolby Digital Plus |
|
|
||||||
| `AC4` | `AC-4` | Dolby AC-4 |
|
|
||||||
| `OPUS` | `OPUS` | Opus |
|
|
||||||
| `OGG` | `VORB` | Vorbis |
|
|
||||||
| `DTS` | `DTS` | DTS |
|
|
||||||
| `DTSX` | `DTS-X` | DTS:X Profile 2 (DTS-UHD) |
|
|
||||||
| `DTSHD` | `DTS-HD` | DTS-HD High Resolution, Master Audio and Express |
|
|
||||||
| `MPEGH` | `MPEG-H` | MPEG-H 3D Audio |
|
|
||||||
| `AV3A` | `Audio Vivid` | Audio Vivid (AVS3-P3) |
|
|
||||||
| `ALAC` | `ALAC` | Apple Lossless |
|
|
||||||
| `FLAC` | `FLAC` | FLAC |
|
|
||||||
| `MP3` | `MP3` | MPEG-1 Audio Layer III |
|
|
||||||
|
|
||||||
unshackle accepts names, values, and a few aliases: `eac3` and `ddp` both give `EC3`,
|
|
||||||
and `vorbis` gives `OGG`.
|
|
||||||
|
|
||||||
```shell title="Prefer Dolby Digital Plus, fall back to AAC"
|
```shell title="Prefer Dolby Digital Plus, fall back to AAC"
|
||||||
unshackle dl -a EC3,AAC EXAMPLE 81234567
|
unshackle dl -a EC3,AAC EXAMPLE 81234567
|
||||||
@@ -349,10 +293,8 @@ unshackle dl -a EC3,AAC EXAMPLE 81234567
|
|||||||
|
|
||||||
### Channels and Atmos
|
### Channels and Atmos
|
||||||
|
|
||||||
- `-c` / `--channels`: desired channel layout, for example `5.1` or `2.0`. Matching is by
|
[`-c` / `--channels` and `-naa` / `--noatmos`](cli-reference.md#quality-codec-bitrate-range) select a
|
||||||
ceiling, so `5.1` implicitly matches a `6.0`-reported layout. An immersive layout such as
|
channel layout, such as `5.1` or `2.0`, and drop the Atmos tracks.
|
||||||
`5.1.4` matches on its total number of channels, so `-c 10` selects it.
|
|
||||||
- `-naa` / `--noatmos`: exclude Atmos audio tracks from selection.
|
|
||||||
|
|
||||||
A track is Atmos when its manifest says so: a DD+ JOC descriptor, an HLS `CHANNELS` value with
|
A track is Atmos when its manifest says so: a DD+ JOC descriptor, an HLS `CHANNELS` value with
|
||||||
`JOC` or `ATMOS` (`16/JOC`, `2/IMSA,ATMOS`), or the Smooth Streaming `HasAtmos` attribute. A DASH
|
`JOC` or `ATMOS` (`16/JOC`, `2/IMSA,ATMOS`), or the Smooth Streaming `HasAtmos` attribute. A DASH
|
||||||
@@ -388,7 +330,7 @@ unshackle dl -a AAC -ab 320 EXAMPLE 81234567
|
|||||||
|
|
||||||
### Video and audio language
|
### Video and audio language
|
||||||
|
|
||||||
`-l` / `--lang` sets the wanted language(s) for **both video and audio**. The default is
|
[`-l` / `--lang`](cli-reference.md#language-subtitles) sets the wanted language(s) for **both video and audio**. The default is
|
||||||
`orig`, the title's original language.
|
`orig`, the title's original language.
|
||||||
|
|
||||||
```shell title="Original language plus English"
|
```shell title="Original language plus English"
|
||||||
@@ -502,7 +444,7 @@ See the [exclusion rules](#excluding-languages) for `--exact-lang`.
|
|||||||
|
|
||||||
### Selecting subtitle languages
|
### Selecting subtitle languages
|
||||||
|
|
||||||
`-sl` / `--s-lang` sets the wanted subtitle language(s). The default is `all`, so
|
[`-sl` / `--s-lang`](cli-reference.md#language-subtitles) sets the wanted subtitle language(s). The default is `all`, so
|
||||||
unshackle downloads every available subtitle language.
|
unshackle downloads every available subtitle language.
|
||||||
|
|
||||||
```shell title="Only English and Spanish subtitles"
|
```shell title="Only English and Spanish subtitles"
|
||||||
@@ -515,7 +457,7 @@ except Spanish, forced Spanish subtitles included.
|
|||||||
|
|
||||||
### Requiring subtitles
|
### Requiring subtitles
|
||||||
|
|
||||||
`--require-subs` takes a list of languages that **must** exist. If any is missing, the
|
[`--require-subs`](cli-reference.md#language-subtitles) takes a list of languages that **must** exist. If any is missing, the
|
||||||
title fails, even under `--best-available` / `--warn-only`. Use it when a download is only
|
title fails, even under `--best-available` / `--warn-only`. Use it when a download is only
|
||||||
worth keeping if a specific subtitle track is present.
|
worth keeping if a specific subtitle track is present.
|
||||||
|
|
||||||
@@ -553,7 +495,7 @@ The check runs against the full track list, before any language selection or exc
|
|||||||
video track counts. `--no-audio` and `--no-video` drop the matching requirement.
|
video track counts. `--no-audio` and `--no-video` drop the matching requirement.
|
||||||
|
|
||||||
A failed title stops the whole run. To skip that title and come back for it later, add
|
A failed title stops the whole run. To skip that title and come back for it later, add
|
||||||
`--skip-missing`, or set `skip_missing: true` under `dl:` in `unshackle.yaml`. It also skips a
|
`--skip-missing`, or set `skip_missing` in the [`dl`](../reference/configuration/download.md#dl) block. It also skips a
|
||||||
title that has no track for a filter such as `-q`, `-v`, `-r`, `-a` or a language you request.
|
title that has no track for a filter such as `-q`, `-v`, `-r`, `-a` or a language you request.
|
||||||
A run with one title, or a run that skips every title, still fails. A REST API job lists each
|
A run with one title, or a run that skips every title, still fails. A REST API job lists each
|
||||||
skipped title and the reason in `skipped_titles`.
|
skipped title and the reason in `skipped_titles`.
|
||||||
@@ -565,26 +507,13 @@ unshackle dl -al ko,en --require-audio ko --skip-missing -w S06 EXAMPLE 0ABC123
|
|||||||
|
|
||||||
### Forced subtitles and output format
|
### Forced subtitles and output format
|
||||||
|
|
||||||
- `-fs` / `--forced-subs`: include forced subtitle tracks (signs/foreign dialogue).
|
Forced subtitles carry signs and foreign dialogue. unshackle drops them unless you add
|
||||||
Without this flag, unshackle drops forced subtitle tracks from the selection.
|
[`-fs`, `-fsl` or `-fso`](cli-reference.md#language-subtitles). `-fsl` takes exclusions too:
|
||||||
- `-fsl` / `--forced-s-lang`: keep forced subtitles only in these languages (implies
|
`-fsl all,-es` keeps every forced subtitle except the Spanish one. With `-fso`, `--s-lang`
|
||||||
`-fs`). Works independently of `--s-lang`, so `-sl all -fsl en` grabs every full
|
and `-fsl` still select the languages.
|
||||||
subtitle but only the English forced track. It accepts exclusions too: `-fsl all,-es`
|
|
||||||
keeps every forced subtitle except the Spanish one, and `-fsl -es` means the same.
|
|
||||||
- `-fso` / `--forced-subs-only`: keep only the forced subtitle tracks and drop every
|
|
||||||
other subtitle (implies `-fs`). `--s-lang` and `-fsl` still select the languages.
|
|
||||||
- `--sub-format`: set the output subtitle format, converting only when necessary.
|
|
||||||
Accepts codec names/values and common aliases (`srt`, `vtt`, `ass`, `ssa`, `ttml`,
|
|
||||||
and the other codec aliases), or the literal `original` to keep the source format.
|
|
||||||
|
|
||||||
| Value | Format |
|
[`--sub-format`](cli-reference.md#language-subtitles) sets the subtitle format of the output, or
|
||||||
| --- | --- |
|
`original` keeps the source format.
|
||||||
| `SRT` / `srt` | SubRip |
|
|
||||||
| `VTT` / `vtt` | WebVTT |
|
|
||||||
| `ASS` / `ass` | Advanced SubStation Alpha |
|
|
||||||
| `SSA` / `ssa` | SubStation Alpha |
|
|
||||||
| `TTML` / `ttml` | Timed Text Markup |
|
|
||||||
| `original` | Keep the source format, no conversion |
|
|
||||||
|
|
||||||
```shell title="Convert subtitles to SRT"
|
```shell title="Convert subtitles to SRT"
|
||||||
unshackle dl --sub-format srt EXAMPLE 81234567
|
unshackle dl --sub-format srt EXAMPLE 81234567
|
||||||
@@ -756,15 +685,8 @@ when you want a part on its own.
|
|||||||
|
|
||||||
### Other selection flags
|
### Other selection flags
|
||||||
|
|
||||||
| Flag | Behaviour |
|
[`--select-titles`, `--latest-episode`, `--latest-episodes` and `--max-downloads`](cli-reference.md#title-episode-selection)
|
||||||
| --- | --- |
|
also select the episodes to download.
|
||||||
| `--select-titles` | Interactively pick episodes of a series, or films when a title has more than one. **Cannot combine with `-w`.** |
|
|
||||||
| `--latest-episode` | Download only the single most recent episode. |
|
|
||||||
| `--latest-episodes N` | Download only the N most recent episodes. The newest episodes can come from more than one season. A [split episode](#split-episodes) counts as one episode, and all its parts download. |
|
|
||||||
| `--max-downloads N` | Stop after N titles have downloaded. A skipped title, or a title already in the completion archive, does not count. With `--skip-dl` or `--no-mux`, a title counts when its run completes. Each part of a [split episode](#split-episodes) counts as one title. unshackle does not open the titles after the limit. |
|
|
||||||
| `--list-titles` | List every title the service returned, then stop. `-w`, `--latest-episode` and `--latest-episodes` are not applied to this listing. |
|
|
||||||
|
|
||||||
When `--latest-episode` or `--latest-episodes` is set, `-w` has no effect.
|
|
||||||
|
|
||||||
```shell title="Grab just the newest episode"
|
```shell title="Grab just the newest episode"
|
||||||
unshackle dl --latest-episode EXAMPLE 81234567
|
unshackle dl --latest-episode EXAMPLE 81234567
|
||||||
@@ -788,31 +710,9 @@ A season that the limit stops before its last episode gets no `season` post-scri
|
|||||||
## Including and excluding track types
|
## Including and excluding track types
|
||||||
|
|
||||||
You can restrict a download to certain track categories, either positively (only these)
|
You can restrict a download to certain track categories, either positively (only these)
|
||||||
or negatively (everything but these).
|
or negatively (everything but these). The [CLI reference](cli-reference.md#track-type-inclusion-exclusion)
|
||||||
|
gives the `*-only` and `no-*` flags, `-ad` and `-ado` for descriptive audio, and
|
||||||
**Only these types** (`*-only` flags):
|
`--skip-subtitle-errors`.
|
||||||
|
|
||||||
- `-V` / `--video-only`
|
|
||||||
- `-A` / `--audio-only`
|
|
||||||
- `-S` / `--subs-only`
|
|
||||||
- `-C` / `--chapters-only`
|
|
||||||
|
|
||||||
**Skip these types** (`no-*` flags):
|
|
||||||
|
|
||||||
- `-nv` / `--no-video`
|
|
||||||
- `-na` / `--no-audio`
|
|
||||||
- `-ns` / `--no-subs`
|
|
||||||
- `-nc` / `--no-chapters`
|
|
||||||
- `-nt` / `--no-attachments` (cover art, subtitle fonts, and files the service attaches)
|
|
||||||
|
|
||||||
Additional track-type flags:
|
|
||||||
|
|
||||||
- `-ad` / `--audio-description`: include descriptive (audio-description) tracks, which
|
|
||||||
unshackle drops by default.
|
|
||||||
- `-ado` / `--audio-description-only`: keep only the descriptive tracks and drop the
|
|
||||||
standard audio. It does not need `-ad`. Add `-A` to download no video or subtitles.
|
|
||||||
- `--skip-subtitle-errors`: if a subtitle fails to download, skip it and continue rather
|
|
||||||
than aborting the whole title. Video and audio failures remain fatal.
|
|
||||||
|
|
||||||
!!! note "The `-only` kind flags"
|
!!! note "The `-only` kind flags"
|
||||||
`-ado` and `-fso` each keep one kind of track inside its track type. They do not drop
|
`-ado` and `-fso` each keep one kind of track inside its track type. They do not drop
|
||||||
@@ -848,14 +748,12 @@ unshackle dl -nc EXAMPLE 81234567
|
|||||||
|
|
||||||
## Listing and dry runs
|
## Listing and dry runs
|
||||||
|
|
||||||
Before committing to a long download, inspect what unshackle *would* do:
|
Before a long download, check what unshackle would do with
|
||||||
|
[`--list`](cli-reference.md#concurrency-caching-listing),
|
||||||
| Flag | Effect |
|
[`--list-titles`](cli-reference.md#title-episode-selection) or
|
||||||
| --- | --- |
|
[`--skip-dl`](cli-reference.md#drm-keys-decryption). To license
|
||||||
| `--list` | List the tracks the service exposes for each title, then stop. No selection, no download. |
|
each track with both Widevine and PlayReady, see
|
||||||
| `--list-titles` | List every title the service returned, then stop. `-w`, `--latest-episode` and `--latest-episodes` are not applied to this listing. |
|
[Widevine and PlayReady on the same title](drm-and-cdm.md#widevine-and-playready-on-the-same-title).
|
||||||
| `--skip-dl` | Skip downloading but still acquire the decryption keys. |
|
|
||||||
| `--all-drm` | License each track with both Widevine and PlayReady. See [Widevine and PlayReady on the same title](drm-and-cdm.md#widevine-and-playready-on-the-same-title). |
|
|
||||||
|
|
||||||
```shell title="See the track selection without downloading"
|
```shell title="See the track selection without downloading"
|
||||||
unshackle dl -q 1080 -v H.265 -r HDR10 --list EXAMPLE 81234567
|
unshackle dl -q 1080 -v H.265 -r HDR10 --list EXAMPLE 81234567
|
||||||
@@ -865,10 +763,8 @@ unshackle dl -q 1080 -v H.265 -r HDR10 --list EXAMPLE 81234567
|
|||||||
|
|
||||||
### Output location and folders
|
### Output location and folders
|
||||||
|
|
||||||
- `-o` / `--output`: override the output directory for this run (otherwise unshackle
|
[`-o` / `--output`](cli-reference.md#output-muxing-files) sends one run to another directory, and
|
||||||
uses the configured downloads directory).
|
`--no-folder` and `--no-source` change the folder and the file name.
|
||||||
- `--no-folder`: do not make a per-show folder for TV downloads.
|
|
||||||
- `--no-source`: remove the service source tag from the filename and path.
|
|
||||||
|
|
||||||
```shell title="Send this download somewhere specific"
|
```shell title="Send this download somewhere specific"
|
||||||
unshackle dl -o ~/Videos/incoming EXAMPLE 81234567
|
unshackle dl -o ~/Videos/incoming EXAMPLE 81234567
|
||||||
@@ -877,15 +773,8 @@ unshackle dl -o ~/Videos/incoming EXAMPLE 81234567
|
|||||||
### Muxing behaviour
|
### Muxing behaviour
|
||||||
|
|
||||||
By default, `mkvmerge` muxes the tracks of a movie or an episode into a single Matroska
|
By default, `mkvmerge` muxes the tracks of a movie or an episode into a single Matroska
|
||||||
(`.mkv`) file. These flags change how unshackle assembles the output:
|
(`.mkv`) file. [`--no-mux`, `--sample`, `--include-sample`, `--split-audio` and
|
||||||
|
`--merge-video`](cli-reference.md#output-muxing-files) change how unshackle assembles the output.
|
||||||
| Flag | Behaviour | Default source |
|
|
||||||
| --- | --- | --- |
|
|
||||||
| `--no-mux` | Do not mux; keep the individual track files. | - |
|
|
||||||
| `--sample` | Download a short sample: 60 seconds from 2 minutes in, or `--sample START-END` for a window in seconds. | - |
|
|
||||||
| `--include-sample` | Download the full title, then also cut a 60 second sample from each muxed file into a `Sample` folder. | - |
|
|
||||||
| `--split-audio` | Write a separate output file per audio codec instead of merging all audio. | config `muxing.merge_audio` (on) |
|
|
||||||
| `--merge-video` | Mux video tracks that share a height, range, and codec into one file, so only language varies inside a file. | config `muxing.merge_video` (off) |
|
|
||||||
|
|
||||||
!!! note "`--sample` needs a segmented track"
|
!!! note "`--sample` needs a segmented track"
|
||||||
`--sample` downloads only the segments that hold the window, and `mkvmerge` cuts the output
|
`--sample` downloads only the segments that hold the window, and `mkvmerge` cuts the output
|
||||||
@@ -907,7 +796,7 @@ By default, `mkvmerge` muxes the tracks of a movie or an episode into a single M
|
|||||||
|
|
||||||
### After the download
|
### After the download
|
||||||
|
|
||||||
`--postscript "<command>"` runs your own command once per output file, with unshackle's
|
[`--postscript "<command>"`](cli-reference.md#output-muxing-files) runs your own command once per output file, with unshackle's
|
||||||
metadata substituted into `{variable}` placeholders. It is repeatable, and it replaces the
|
metadata substituted into `{variable}` placeholders. It is repeatable, and it replaces the
|
||||||
`post_scripts` config for that run. No `success` post-script operates under `--no-mux`, because
|
`post_scripts` config for that run. No `success` post-script operates under `--no-mux`, because
|
||||||
that run writes no muxed output; a song is the exception, because `--no-mux` does not apply to it.
|
that run writes no muxed output; a song is the exception, because `--no-mux` does not apply to it.
|
||||||
@@ -930,8 +819,7 @@ post-scripts and for the full variable list, see
|
|||||||
|
|
||||||
### Naming tags
|
### Naming tags
|
||||||
|
|
||||||
- `--tag`: set the release group tag (overrides the configured tag).
|
[`--tag` and `--repack`](cli-reference.md#output-muxing-files) change the tags in the file name.
|
||||||
- `--repack`: add a `REPACK` tag to the output filename.
|
|
||||||
|
|
||||||
```shell title="Custom group tag and a REPACK label"
|
```shell title="Custom group tag and a REPACK label"
|
||||||
unshackle dl --tag MYGRP --repack EXAMPLE 81234567
|
unshackle dl --tag MYGRP --repack EXAMPLE 81234567
|
||||||
@@ -939,7 +827,7 @@ unshackle dl --tag MYGRP --repack EXAMPLE 81234567
|
|||||||
|
|
||||||
## Proxies
|
## Proxies
|
||||||
|
|
||||||
`--proxy` accepts a full proxy URI, a country or location code (resolved through your
|
[`--proxy`](cli-reference.md#network-proxy) accepts a full proxy URI, a country or location code (resolved through your
|
||||||
configured proxy providers), or a `provider:region` form. See
|
configured proxy providers), or a `provider:region` form. See
|
||||||
[Proxies & VPN](proxies-and-vpn.md#how-proxy-resolution-works) for the exact grammar.
|
[Proxies & VPN](proxies-and-vpn.md#how-proxy-resolution-works) for the exact grammar.
|
||||||
|
|
||||||
@@ -950,28 +838,14 @@ unshackle dl --proxy controld:yul EXAMPLE 81234567
|
|||||||
unshackle dl --proxy 'http://user:pass@host:8080' EXAMPLE 81234567
|
unshackle dl --proxy 'http://user:pass@host:8080' EXAMPLE 81234567
|
||||||
```
|
```
|
||||||
|
|
||||||
Three related flags:
|
[`--no-proxy`, `--no-proxy-download` and `--proxy-download`](cli-reference.md#network-proxy) change
|
||||||
|
which requests use the proxy. Use `--no-proxy-download` when you need the proxy only to pass
|
||||||
- `--no-proxy`: force-disable all proxy use for this run.
|
the geo-check of the service, not to move the bulk of the data.
|
||||||
- `--no-proxy-download`: bypass the proxy for **all downloads**. The manifest,
|
|
||||||
license, and authentication requests still go through the proxy. This is useful when you
|
|
||||||
need the proxy only to satisfy geo-checks, not to move the bulk of the data.
|
|
||||||
- `--proxy-download`: use a different proxy for **all downloads**. The manifest,
|
|
||||||
license, and authentication requests still go through `--proxy`. Takes the same forms
|
|
||||||
as `--proxy`.
|
|
||||||
|
|
||||||
## Performance and caching
|
## Performance and caching
|
||||||
|
|
||||||
| Flag | Purpose |
|
The [concurrency and caching flags](cli-reference.md#concurrency-caching-listing) control the parallel
|
||||||
| --- | --- |
|
downloads, the speed limit, the delay between titles and the title cache.
|
||||||
| `--workers N` | Threads used per track for segment downloads. Default depends on the downloader. |
|
|
||||||
| `--adaptive-workers` | Opt-in: start the per-track worker count at `--workers`, reduce it when the CDN returns errors, then raise it again while the extra workers add measured throughput. The count never goes above `--workers`. Off by default (fixed worker count). |
|
|
||||||
| `--download-processes N` | Opt-in: split a large segment batch across `N` download processes, each with its own worker pool. A single process tops out around 1.3 Gb/s (Python interpreter limit); `2` reaches 2.5GbE line rate on fast CDNs. Only engages for batches of 24+ segments. Ignored while `--speed-limit` (or serve's `global_speed_limit`) is set: the cap is a per-job budget, which extra processes cannot share, so the download stays in a single process. Also ignored when the service HTTP session carries state a child process cannot rebuild, such as a custom TLS adapter. The download stays in a single process instead of running with the wrong settings. Default `1`. |
|
|
||||||
| `--continue-downloads` | Opt-in: keep completed segment files when a download fails so the next run resumes instead of restarting from zero. One-off enable of the [`continue_downloads`](../reference/configuration/download.md#continue_downloads) config option, which documents what can and cannot resume. |
|
|
||||||
| `--downloads N` | Number of tracks downloaded concurrently. Default `1`. |
|
|
||||||
| `--slow [MIN-MAX]` | Add a delay between titles to look more like a real device. `--slow` alone means 60-120s; `--slow 20-40` sets a custom range. Minimum 20s. |
|
|
||||||
| `--no-cache` | Bypass the title cache for this download. |
|
|
||||||
| `--reset-cache` | Clear the title cache before fetching. |
|
|
||||||
|
|
||||||
```shell title="Two tracks at a time, eight threads each"
|
```shell title="Two tracks at a time, eight threads each"
|
||||||
unshackle dl --downloads 2 --workers 8 EXAMPLE 81234567
|
unshackle dl --downloads 2 --workers 8 EXAMPLE 81234567
|
||||||
@@ -983,22 +857,19 @@ unshackle dl -w S01 --slow 30-60 EXAMPLE 81234567
|
|||||||
|
|
||||||
## Keys, vaults, and export
|
## Keys, vaults, and export
|
||||||
|
|
||||||
By default, unshackle checks your **key vaults** first and only asks a **CDM** to license
|
By default, unshackle checks your **key vaults** and only asks a **CDM** for a licence
|
||||||
a content key when the vault misses. You can force one side or the other:
|
when no vault has the content key; [Keys, vaults, and caching](drm-and-cdm.md#keys-vaults-and-caching)
|
||||||
|
gives the full order. [`--cdm-only` and `--vaults-only`](cli-reference.md#drm-keys-decryption) force
|
||||||
- `--cdm-only`: only use the CDM (skip vaults). Over `--remote`, your own CDM licenses each track, and the run uses neither the server CDM nor the server vault. It needs a local CDM, and a remote session on the server's device fails.
|
one side or the other, and `--cdm` selects the CDM device for one run.
|
||||||
- `--cdm <name>`: use the named CDM device for this run, ignoring the `cdm` config mapping (including its quality and Widevine/PlayReady sub-entries). Over `--remote`, that device licenses the remote session, not the server CDM.
|
|
||||||
- `--vaults-only`: only use key vaults and never license through the CDM. A missing
|
|
||||||
content key fails.
|
|
||||||
|
|
||||||
```shell title="Fetch keys only, no download"
|
```shell title="Fetch keys only, no download"
|
||||||
unshackle dl --skip-dl EXAMPLE 81234567
|
unshackle dl --skip-dl EXAMPLE 81234567
|
||||||
```
|
```
|
||||||
|
|
||||||
`--export` writes a `mediaexport` JSON file into the configured exports directory. It holds
|
[`--export`](cli-reference.md#drm-keys-decryption) writes an export into the configured exports
|
||||||
the manifest, the DRM init data, the content keys, the KIDs of each track and the title
|
directory. It holds the manifest, the DRM init data, the content keys, the KIDs of each track
|
||||||
metadata for each title. For a DASH or ISM title, it also holds the manifest as the service
|
and the title metadata for each title. For a DASH or ISM title, it also holds the manifest
|
||||||
left it, with the ad periods that the service skips. `unshackle import` reads it to reconstruct
|
snapshot: the manifest as the service left it, with the filtered periods that the download skips. `unshackle import` reads it to reconstruct
|
||||||
a download later, and gives each track only the content keys for its KIDs. The import uses the
|
a download later, and gives each track only the content keys for its KIDs. The import uses the
|
||||||
saved manifest, so it skips the same periods and does not fetch the manifest again. The importer also reads the
|
saved manifest, so it skips the same periods and does not fetch the manifest again. The importer also reads the
|
||||||
older unshackle `version: 2` files and unidl's own export files.
|
older unshackle `version: 2` files and unidl's own export files.
|
||||||
@@ -1085,11 +956,11 @@ The [mediaexport](https://github.com/unshackle-dl/mediaexport) package specifies
|
|||||||
title language, the video track takes the language of the default audio track. When
|
title language, the video track takes the language of the default audio track. When
|
||||||
the master playlist gives no audio language either, the import stops with a message.
|
the master playlist gives no audio language either, the import stops with a message.
|
||||||
|
|
||||||
!!! note "Ad periods a service skipped stay skipped"
|
!!! note "Filtered periods stay filtered"
|
||||||
Some services skip DASH periods, such as ads, by a rule of their own. The export also
|
Some services skip DASH periods, such as ads, by a rule of their own. The export also
|
||||||
records the periods the service kept as `content_periods` on each manifest. An import that
|
records the periods the service kept as `content_periods` on each manifest. An import that
|
||||||
must fetch the manifest again, because the file has no saved manifest or another tool wrote
|
must fetch the manifest again, because the file has no saved manifest or another tool wrote
|
||||||
it, downloads only those periods, also when the new manifest gives an ad period a new ID.
|
it, downloads only those periods, also when the new manifest gives a filtered period a new ID.
|
||||||
When the new manifest has none of the recorded periods, the import logs a warning and keeps
|
When the new manifest has none of the recorded periods, the import logs a warning and keeps
|
||||||
every period.
|
every period.
|
||||||
|
|
||||||
@@ -1103,15 +974,9 @@ of `--tmdb`, `--imdb` and `--tvdb`, and unshackle works the rest out from it. To
|
|||||||
lookups but keep the IDs you give, set
|
lookups but keep the IDs you give, set
|
||||||
[`disable_metadata`](../reference/configuration/misc.md#external-api-keys) in your config.
|
[`disable_metadata`](../reference/configuration/misc.md#external-api-keys) in your config.
|
||||||
|
|
||||||
| Flag | Example | Purpose |
|
The [CLI reference](cli-reference.md#metadata-tagging) describes `--tmdb`, `--imdb`, `--tvdb`,
|
||||||
| --- | --- | --- |
|
`--anilist`, `--enrich`, `--tvdb-order` and `--continuous-episodes`, and the rules for
|
||||||
| `--tmdb` | `--tmdb 27205` | Use this TMDB ID instead of an automatic search. Needs `tmdb_api_key`. |
|
combining the ID flags.
|
||||||
| `--imdb` | `--imdb tt1375666` | Use this IMDb ID instead of an automatic search. Needs no API key. |
|
|
||||||
| `--tvdb` | `--tvdb 73871` | Use this TVDB ID instead of looking the series up. Needs `tvdb_api_key`. |
|
|
||||||
| `--anilist` | `--anilist 21` | Use this AniList ID instead of an automatic search. `mal:12345` is also accepted. Needs no API key. |
|
|
||||||
| `--enrich` | - | Overwrite the show title, year and original language with the external source's. **Requires** one of `--tmdb`, `--imdb`, `--tvdb`, or `--anilist`. |
|
|
||||||
| `--tvdb-order` | `--tvdb-order dvd` | Renumber episodes to a TVDB season order. Needs `tvdb_api_key`. |
|
|
||||||
| `-ce` / `--continuous-episodes` | - | Number each season on from the season before it, so season two starts at `S02E05` after four episodes. |
|
|
||||||
|
|
||||||
```shell title="Force the right IMDb match, and keep the service's own naming"
|
```shell title="Force the right IMDb match, and keep the service's own naming"
|
||||||
unshackle dl --imdb tt1375666 EXAMPLE 81234567
|
unshackle dl --imdb tt1375666 EXAMPLE 81234567
|
||||||
@@ -1166,13 +1031,6 @@ Each ID goes to the providers that read that kind of ID, in
|
|||||||
Pair it with `--tmdb`, `--imdb` or `--tvdb` when the map has no entry for the title, or
|
Pair it with `--tmdb`, `--imdb` or `--tvdb` when the map has no entry for the title, or
|
||||||
a wrong one. An ID that you give always wins over the map.
|
a wrong one. An ID that you give always wins over the map.
|
||||||
|
|
||||||
Give **one** of `--tmdb`, `--imdb` and `--tvdb`. You cannot combine them, because one ID
|
|
||||||
does the job on its own: unshackle finds the other two from it and writes all three to the
|
|
||||||
tags.
|
|
||||||
Passing two is an error rather than a silent choice between them. `--anilist` is the exception
|
|
||||||
and still pairs with one of the three, which is how you set the western ID of an anime title
|
|
||||||
yourself.
|
|
||||||
|
|
||||||
!!! note "The AniList ID map"
|
!!! note "The AniList ID map"
|
||||||
An AniList match, from a search or from `--anilist`, has no TMDB, IMDb or TVDB ID. unshackle
|
An AniList match, from a search or from `--anilist`, has no TMDB, IMDb or TVDB ID. unshackle
|
||||||
then looks the AniList ID up in the anime-lists ID map. It downloads the map (about 7 MB) the
|
then looks the AniList ID up in the anime-lists ID map. It downloads the map (about 7 MB) the
|
||||||
@@ -1190,12 +1048,6 @@ yourself.
|
|||||||
numbering, and when the two give different entries, it writes no AniList tag. A TMDB movie ID takes only the AniList entry of that movie.
|
numbering, and when the two give different entries, it writes no AniList tag. A TMDB movie ID takes only the AniList entry of that movie.
|
||||||
An AniList ID that you give with `--anilist` always wins over the map.
|
An AniList ID that you give with `--anilist` always wins over the map.
|
||||||
|
|
||||||
The ID you give must have a metadata provider that can find it, so unshackle makes sure of
|
|
||||||
that before it downloads anything. `--tmdb` without `tmdb_api_key`, or an ID whose metadata
|
|
||||||
providers your `metadata_providers` list leaves out, fails immediately with a message naming
|
|
||||||
what to set. `--imdb` needs no API key, because the `imdb` metadata provider is keyless
|
|
||||||
and in the default order.
|
|
||||||
|
|
||||||
With `--enrich`, the title, year and original language are all replaced with the external
|
With `--enrich`, the title, year and original language are all replaced with the external
|
||||||
source's values, whether or not the service already filled them in. A field the source does
|
source's values, whether or not the service already filled them in. A field the source does
|
||||||
not answer with is left alone, and unshackle logs which fields those were, so a metadata provider
|
not answer with is left alone, and unshackle logs which fields those were, so a metadata provider
|
||||||
@@ -1228,8 +1080,8 @@ order the service used, then renumbers the episodes into the order you asked for
|
|||||||
unshackle dl --tvdb-order dvd EXAMPLE 81234567
|
unshackle dl --tvdb-order dvd EXAMPLE 81234567
|
||||||
```
|
```
|
||||||
|
|
||||||
Available orders are `official` (aired), `dvd`, `absolute`, `alternate`, and `regional`. Set
|
Set [`tvdb_order`](../reference/configuration/misc.md#external-api-keys) in your config to apply
|
||||||
`tvdb_order` in your config to apply one by default.
|
an order by default.
|
||||||
|
|
||||||
!!! warning "Orders that do not cover the whole series"
|
!!! warning "Orders that do not cover the whole series"
|
||||||
An order can leave out episodes the service carries. TVDB's `dvd` order does not
|
An order can leave out episodes the service carries. TVDB's `dvd` order does not
|
||||||
@@ -1240,7 +1092,7 @@ Available orders are `official` (aired), `dvd`, `absolute`, `alternate`, and `re
|
|||||||
### Continuous episode numbers
|
### Continuous episode numbers
|
||||||
|
|
||||||
Some anime release groups number each season on from the season before it. With
|
Some anime release groups number each season on from the season before it. With
|
||||||
`--continuous-episodes`, a season two that follows a four-episode season one starts at
|
[`--continuous-episodes`](cli-reference.md#metadata-tagging), a season two that follows a four-episode season one starts at
|
||||||
`S02E05`:
|
`S02E05`:
|
||||||
|
|
||||||
```shell title="Number season two on from season one"
|
```shell title="Number season two on from season one"
|
||||||
@@ -1253,62 +1105,3 @@ Season 0 and episode 0 keep their numbers, and a season that already starts past
|
|||||||
season before it is not changed. The renumbering runs before `--wanted`, so select episodes
|
season before it is not changed. The renumbering runs before `--wanted`, so select episodes
|
||||||
by their new numbers, for example `-w S02E05`. A whole-season selection such as `-w S05`
|
by their new numbers, for example `-w S02E05`. A whole-season selection such as `-w S05`
|
||||||
matches episodes up to E999 only.
|
matches episodes up to E999 only.
|
||||||
|
|
||||||
## Configuration defaults
|
|
||||||
|
|
||||||
You can set every flag on this page as a default in your configuration file so you do not
|
|
||||||
have to type it each time, and you can scope defaults per service. See
|
|
||||||
[Configuration file](../getting-started/configuration-file.md) for the `dl:` block and
|
|
||||||
per-service overrides.
|
|
||||||
|
|
||||||
!!! tip "Explicit flags always win"
|
|
||||||
A value you pass on the command line (or through an environment variable) always takes
|
|
||||||
precedence over both the global `dl:` defaults and any per-service `dl:` overrides.
|
|
||||||
Config only fills in options you did not set explicitly.
|
|
||||||
|
|
||||||
## Quick reference
|
|
||||||
|
|
||||||
A condensed lookup of the most-used options. Use `unshackle dl --help` for the complete,
|
|
||||||
authoritative list.
|
|
||||||
|
|
||||||
| Flag | Short | Meaning |
|
|
||||||
| --- | --- | --- |
|
|
||||||
| `--quality` | `-q` | Target resolution(s), e.g. `1080,720`. |
|
|
||||||
| `--vcodec` | `-v` | Video codec(s). |
|
|
||||||
| `--acodec` | `-a` | Audio codec(s). |
|
|
||||||
| `--range` | `-r` | Colour range(s). Default `SDR`. |
|
|
||||||
| `--channels` | `-c` | Audio channel layout. |
|
|
||||||
| `--noatmos` | `-naa` | Exclude Atmos audio. |
|
|
||||||
| `--lang` | `-l` | Video + audio language(s); default `orig`. `-` excludes, e.g. `all,-es`. |
|
|
||||||
| `--a-lang` | `-al` | Audio-only language override. `-` excludes. |
|
|
||||||
| `--v-lang` | `-vl` | Video-only language override. `-` excludes. |
|
|
||||||
| `--s-lang` | `-sl` | Subtitle language(s); default `all`. `-` excludes, e.g. `all,-es`. |
|
|
||||||
| `--forced-subs` | `-fs` | Include forced subtitles. |
|
|
||||||
| `--forced-s-lang` | `-fsl` | Forced subtitle language(s); implies `-fs`. `-` excludes. |
|
|
||||||
| `--sub-format` | | Output subtitle format. |
|
|
||||||
| `--sub-font` | | Font for subtitles converted to ASS; implies `--sub-format ASS`. |
|
|
||||||
| `--wanted` | `-w` | Episode/season range, an air date, or a number of the track list for a music release (`1-5`, `2x3`). |
|
|
||||||
| `--daily` | | Fill missing air dates from TVDB during `--enrich`. |
|
|
||||||
| `--select-titles` | | Interactively pick episodes or films. |
|
|
||||||
| `--latest-episode` | | Only the newest episode. |
|
|
||||||
| `--latest-episodes N` | | Only the N newest episodes. |
|
|
||||||
| `--max-downloads N` | | Stop after N downloaded titles. |
|
|
||||||
| `--video-only` / `--audio-only` / `--subs-only` | `-V` / `-A` / `-S` | Restrict track types. |
|
|
||||||
| `--no-video` / `--no-audio` / `--no-subs` / `--no-chapters` / `--no-attachments` | `-nv` / `-na` / `-ns` / `-nc` / `-nt` | Skip track types. |
|
|
||||||
| `--worst` | | Lowest-bitrate video at each requested resolution, or at the lowest resolution if none is set. |
|
|
||||||
| `--require-audio` | | Audio languages that must exist. The title fails if one is missing. |
|
|
||||||
| `--require-video` | | Video languages that must exist. The title fails if one is missing. |
|
|
||||||
| `--best-available` | | Degrade gracefully instead of failing. |
|
|
||||||
| `--skip-missing` | | Skip a title that misses a required language or track, and continue with the next title. |
|
|
||||||
| `--output` | `-o` | Output directory for this run. |
|
|
||||||
| `--split-audio` / `--merge-video` / `--no-mux` | | Muxing behaviour. |
|
|
||||||
| `--postscript` / `--no-postscript` | | Run a command after each output file, or run none. |
|
|
||||||
| `--proxy` / `--no-proxy` / `--no-proxy-download` / `--proxy-download` | | Proxy control. |
|
|
||||||
| `--workers` / `--downloads` / `--slow` | | Concurrency and pacing. |
|
|
||||||
| `--list` / `--list-titles` / `--skip-dl` | | Dry runs. |
|
|
||||||
| `--cdm-only` / `--vaults-only` | | Content key source control. |
|
|
||||||
| `--cdm <name>` | | Pin one CDM device, bypassing the `cdm` config mapping. |
|
|
||||||
| `--export` | | Export track info and keys to JSON. |
|
|
||||||
| `--tmdb` / `--imdb` / `--tvdb` / `--anilist` / `--enrich` | | Metadata overrides. |
|
|
||||||
| `--tvdb-order` | | Renumber episodes to a TVDB season order. |
|
|
||||||
| `-ce` / `--continuous-episodes` | | Number each season on from the season before it. |
|
|
||||||
|
|||||||
+11
-15
@@ -640,24 +640,20 @@ merged file once. The README of each plugin gives its device files, its tools an
|
|||||||
|
|
||||||
## Keys, vaults, and caching
|
## Keys, vaults, and caching
|
||||||
|
|
||||||
Fetching a license is comparatively slow and, for some services, rate-limited.
|
Fetching a licence is comparatively slow and, for some services, rate-limited.
|
||||||
unshackle therefore resolves each key ID in this order before ever contacting a
|
unshackle therefore resolves each key ID in this order before ever contacting a
|
||||||
license server:
|
licence server:
|
||||||
|
|
||||||
1. Keys already known for the current DRM object.
|
1. The content keys that a remote server gives over `--remote`, or that an export holds
|
||||||
2. An in-process cache of content keys, for the current `dl` run.
|
for `unshackle import`.
|
||||||
|
2. The content keys that the run already holds: from the service, or from an earlier track.
|
||||||
3. Your configured [key vaults](vaults.md).
|
3. Your configured [key vaults](vaults.md).
|
||||||
4. Only if still missing, a live license request.
|
4. Only if still missing, a licence from the CDM.
|
||||||
|
|
||||||
After a successful license request, unshackle writes the recovered keys back to all
|
After a successful licence, unshackle writes the recovered keys back to all
|
||||||
configured vaults, so future downloads can skip the license server. Two flags let you
|
configured vaults, so future downloads can skip the licence server.
|
||||||
control this trade-off on the `dl` command:
|
[`--vaults-only`, `--cdm-only` and `--cdm`](cli-reference.md#drm-keys-decryption) change
|
||||||
|
this for one `dl` run.
|
||||||
| Flag | Effect |
|
|
||||||
|------|--------|
|
|
||||||
| `--vaults-only` | Never send a license request; use only cached/vault keys. Fails if a content key is missing. |
|
|
||||||
| `--cdm-only` | Ignore vaults for sourcing keys and always perform a fresh license request. Over `--remote`, your own CDM licenses each track, and the run uses neither the server CDM nor the server vault. A remote session on the server's device fails, and so does a run with no local CDM. |
|
|
||||||
| `--cdm <name>` | Use the named CDM device for this run instead of the one the `cdm` config maps for the service. Over `--remote`, that device licenses the remote session, not the server CDM. |
|
|
||||||
|
|
||||||
See [key vaults](vaults.md) for how to configure vault backends.
|
See [key vaults](vaults.md) for how to configure vault backends.
|
||||||
|
|
||||||
@@ -680,7 +676,7 @@ debug_requests: true
|
|||||||
|
|
||||||
## See also
|
## See also
|
||||||
|
|
||||||
- [Downloading](downloading.md): the `dl` command and its DRM-related flags.
|
- [CLI reference](cli-reference.md#drm-keys-decryption): the DRM-related flags of the `dl` command.
|
||||||
- [Key vaults](vaults.md): caching content keys across downloads.
|
- [Key vaults](vaults.md): caching content keys across downloads.
|
||||||
- [Configuration](../reference/configuration/index.md): the full `unshackle.yaml` reference.
|
- [Configuration](../reference/configuration/index.md): the full `unshackle.yaml` reference.
|
||||||
- [Dependencies](../getting-started/installation.md): installing shaka-packager and mp4decrypt.
|
- [Dependencies](../getting-started/installation.md): installing shaka-packager and mp4decrypt.
|
||||||
|
|||||||
@@ -662,4 +662,4 @@ how the optional (`?`) variables appear and disappear.
|
|||||||
## See also
|
## See also
|
||||||
|
|
||||||
- [Configuration File](../getting-started/configuration-file.md): the full `unshackle.yaml` structure.
|
- [Configuration File](../getting-started/configuration-file.md): the full `unshackle.yaml` structure.
|
||||||
- [Downloading](downloading.md): the `dl` command and per-run flags like `-o`, `--no-folder`, `--tag`, and `--repack`.
|
- [CLI reference](cli-reference.md#output-muxing-files): the per-run flags like `-o`, `--no-folder`, `--tag`, and `--repack`.
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ unshackle dl --proxy nordvpn:us EXAMPLE 81234567
|
|||||||
!!! tip "Set a default proxy in config"
|
!!! tip "Set a default proxy in config"
|
||||||
Like every `dl` flag, you can give `--proxy` a default in your configuration, so you
|
Like every `dl` flag, you can give `--proxy` a default in your configuration, so you
|
||||||
do not have to pass it on every command. See
|
do not have to pass it on every command. See
|
||||||
[Downloading](downloading.md) for how `dl` options and config defaults interact.
|
the [`dl`](../reference/configuration/download.md#dl) block for how `dl` options and config defaults interact.
|
||||||
|
|
||||||
### `--no-proxy-download`
|
### `--no-proxy-download`
|
||||||
|
|
||||||
|
|||||||
@@ -344,7 +344,7 @@ Each command reports how many files it removed and how much space it freed, then
|
|||||||
!!! example "The wrong titles/metadata keep coming back"
|
!!! example "The wrong titles/metadata keep coming back"
|
||||||
**Symptom:** a service returns outdated titles even after the source changed.
|
**Symptom:** a service returns outdated titles even after the source changed.
|
||||||
|
|
||||||
**Inspect:** the title cache is likely serving stale data. Clear it with `unshackle env clear cache <SERVICE>`, or bypass it for one run using the `dl` no-cache / reset-cache options (see [Downloading](downloading.md) and the [CLI Reference](cli-reference.md#dl)).
|
**Inspect:** the title cache is likely serving stale data. Clear it with `unshackle env clear cache <SERVICE>`, or bypass it for one run using the `dl` no-cache / reset-cache options (see the [CLI Reference](cli-reference.md#concurrency-caching-listing)).
|
||||||
|
|
||||||
!!! example "A config value doesn't seem to apply"
|
!!! example "A config value doesn't seem to apply"
|
||||||
**Symptom:** a setting you edited has no effect.
|
**Symptom:** a setting you edited has no effect.
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
- **Type:** `dict` · **Default:** `{}`
|
- **Type:** `dict` · **Default:** `{}`
|
||||||
|
|
||||||
Persistent defaults for the `dl` command. unshackle uses the block as Click's `default_map`,
|
Persistent defaults for the `dl` command. unshackle uses the block as Click's `default_map`,
|
||||||
so you can give any `dl` flag a default here. See [Downloading](../../guide/downloading.md) and the
|
so you can give any `dl` flag a default here. See the
|
||||||
[CLI Reference](../../guide/cli-reference.md) for what each flag does.
|
[CLI Reference](../../guide/cli-reference.md#dl) for what each flag does.
|
||||||
|
|
||||||
**Config key naming.** A config key is the flag's long name with dashes replaced by
|
**Config key naming.** A config key is the flag's long name with dashes replaced by
|
||||||
underscores (`--best-available` → `best_available`, `--sub-format` → `sub_format`). A few
|
underscores (`--best-available` → `best_available`, `--sub-format` → `sub_format`). A few
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import re
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
from unshackle.commands.dl import dl
|
||||||
|
|
||||||
|
CLI_REFERENCE = Path(__file__).parents[2] / "docs" / "guide" / "cli-reference.md"
|
||||||
|
|
||||||
|
|
||||||
|
def dl_section_flags() -> set[str]:
|
||||||
|
"""The flags that start a code span in the `dl` section of the CLI reference."""
|
||||||
|
text = CLI_REFERENCE.read_text(encoding="utf-8")
|
||||||
|
start = text.index("## `dl`")
|
||||||
|
section = text[start : text.index("\n## ", start)]
|
||||||
|
return set(re.findall(r"`(--?[a-zA-Z][\w-]*)", section))
|
||||||
|
|
||||||
|
|
||||||
|
def dl_option_flags() -> set[str]:
|
||||||
|
return {
|
||||||
|
flag
|
||||||
|
for param in dl.cli.params
|
||||||
|
if param.param_type_name == "option" and not param.hidden
|
||||||
|
for flag in (*param.opts, *param.secondary_opts)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def test_every_dl_option_is_in_the_cli_reference() -> None:
|
||||||
|
assert dl_option_flags() - dl_section_flags() == set()
|
||||||
|
|
||||||
|
|
||||||
|
def test_every_long_flag_in_the_cli_reference_is_a_dl_option() -> None:
|
||||||
|
assert {flag for flag in dl_section_flags() if flag.startswith("--")} - dl_option_flags() == set()
|
||||||
@@ -1013,20 +1013,20 @@ class dl:
|
|||||||
default=None,
|
default=None,
|
||||||
help="Add a delay between each Title download to act more like a real device. "
|
help="Add a delay between each Title download to act more like a real device. "
|
||||||
"Use --slow for a 60-120s delay, or --slow MIN-MAX (e.g., --slow 20-40) for a custom range. "
|
"Use --slow for a 60-120s delay, or --slow MIN-MAX (e.g., --slow 20-40) for a custom range. "
|
||||||
"Minimum delay is 20 seconds.",
|
"MIN must be at least 5 seconds.",
|
||||||
)
|
)
|
||||||
@click.option(
|
@click.option(
|
||||||
"--list",
|
"--list",
|
||||||
"list_",
|
"list_",
|
||||||
is_flag=True,
|
is_flag=True,
|
||||||
default=False,
|
default=False,
|
||||||
help="Skip downloading and list available tracks and what tracks would have been downloaded.",
|
help="List every track of each title, then stop before track selection.",
|
||||||
)
|
)
|
||||||
@click.option(
|
@click.option(
|
||||||
"--list-titles",
|
"--list-titles",
|
||||||
is_flag=True,
|
is_flag=True,
|
||||||
default=False,
|
default=False,
|
||||||
help="Skip downloading, only list available titles that would have been downloaded.",
|
help="List every title the service returned, then stop. -w and --latest-episode(s) do not apply.",
|
||||||
)
|
)
|
||||||
@click.option(
|
@click.option(
|
||||||
"--skip-dl", is_flag=True, default=False, help="Skip downloading while still retrieving the decryption keys."
|
"--skip-dl", is_flag=True, default=False, help="Skip downloading while still retrieving the decryption keys."
|
||||||
@@ -1077,7 +1077,12 @@ class dl:
|
|||||||
default=None,
|
default=None,
|
||||||
help="Proxy for the downloads only, in the same form as --proxy. Manifest, license, and auth use --proxy.",
|
help="Proxy for the downloads only, in the same form as --proxy. Manifest, license, and auth use --proxy.",
|
||||||
)
|
)
|
||||||
@click.option("--no-folder", is_flag=True, default=False, help="Disable folder creation for TV Shows.")
|
@click.option(
|
||||||
|
"--no-folder",
|
||||||
|
is_flag=True,
|
||||||
|
default=False,
|
||||||
|
help="Write the files directly in the output directory, with no title folder.",
|
||||||
|
)
|
||||||
@click.option(
|
@click.option(
|
||||||
"--no-source", is_flag=True, default=False, help="Disable the source tag from the output file name and path."
|
"--no-source", is_flag=True, default=False, help="Disable the source tag from the output file name and path."
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -377,7 +377,7 @@ def search(kid: str, service: str | None, vault_name: str | None) -> None:
|
|||||||
"""
|
"""
|
||||||
Examine configured Key Vault(s) for a KID and report the content key it finds.
|
Examine configured Key Vault(s) for a KID and report the content key it finds.
|
||||||
|
|
||||||
KID must be 32 hex characters (no dashes). If you do not give --service,
|
KID must be 32 hex characters; unshackle removes dashes. If you do not give --service,
|
||||||
unshackle scans every service table in each vault. For a vault that cannot
|
unshackle scans every service table in each vault. For a vault that cannot
|
||||||
show its tables, unshackle probes every locally installed service tag
|
show its tables, unshackle probes every locally installed service tag
|
||||||
instead, so --service is much faster. If you do not give --vault, unshackle
|
instead, so --service is much faster. If you do not give --vault, unshackle
|
||||||
|
|||||||
@@ -1307,7 +1307,8 @@ async def download(request: web.Request) -> web.Response:
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
description: >-
|
description: >-
|
||||||
Make no folder for a series.
|
Write the files directly in the output directory, with no folder for the title, for every kind of
|
||||||
|
title.
|
||||||
no_source:
|
no_source:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
|||||||
Reference in New Issue
Block a user