docs: sweep docs to zero ste_lint findings and one remote session name

This commit is contained in:
imSp4rky
2026-12-04 18:50:27 -07:00
parent 34c8fabe6f
commit 87b58190ea
34 changed files with 134 additions and 214 deletions
+15 -15
View File
@@ -78,11 +78,11 @@ These are abstract. A service will not load unless it defines all three:
`search` command can operate. unshackle calls `authenticate()` first, unless the
service sets `ANONYMOUS_SEARCH`.
- **Licence callbacks**: see [DRM hooks](#drm-hooks) below.
- **`request_input(prompt, qr=None)`**: prompts the user. It goes through the remote-dl input
- **`request_input(prompt, qr=None)`**: prompts the user. It goes through the remote session input
bridge, the REST download job relay, or the rich console.
- **`wait_for_approval(message, check, timeout, interval=3.0, qr=None)`**: shows a message, then
calls `check` until it returns a value. Use it for a login that the user approves on
another device, such as a pair code. A remote-dl session shows the message as a log
another device, such as a pair code. A remote session shows the message as a log
line, and a REST download job shows it as the job's `notice`. Both methods take `qr`, the
text of a QR code to scan, and the terminal or UI that shows the user the message draws it.
When the login API gives only a PNG, `read_qr_image(data)` in `unshackle.core.console`
@@ -323,8 +323,8 @@ The value also goes to a `--remote` client. A track without it muxes everything
and `sdh`, and `forced` cannot combine with either. `Subtitle.Codec` includes `SubRip`
(SRT), `WebVTT` (VTT), `SubStationAlpha`/`SubStationAlphav4` (SSA/ASS),
`TimedTextMarkupLang` (TTML), `SAMI`, `SCC`, and the box-encapsulated DASH formats `fTTML`
(STPP) and `fVTT` (WVTT). Subtitles receive post-download normalization
(segment merging, WebVTT sanitization, format conversion, and optional SDH stripping),
(STPP) and `fVTT` (WVTT). Subtitles receive post-download normalisation
(segment merging, WebVTT sanitisation, format conversion, and optional SDH stripping),
all documented for users in [Subtitles](../guide/subtitles.md).
### Chapters and attachments
@@ -415,7 +415,7 @@ least one and no track is left.
- **Segments** of each format: unshackle inflates a segment body that is one whole gzip member
before the merge, up to a size limit. A CDN can send such a body with no `Content-Encoding`
header. Any other body stays as it is, such as AES-128 ciphertext that starts with the gzip magic.
- **ISM** has no list of segments and no init segments: the parser synthesizes segment URLs
- **ISM** has no list of segments and no init segments: the parser synthesises segment URLs
from the `<c>` fragment timeline, and rebuilds a `moov`/`ftyp` init box from `CodecPrivateData`
(supported for AVC, HEVC, DV-over-HEVC, AAC, EC-3, and TTML). A track id covers the manifest
URL, so a title you build from one ISM manifest per codec or range keeps every variant:
@@ -424,16 +424,16 @@ least one and no track is left.
## DRM hooks
If a track carries DRM, the framework licenses and decrypts it, but it needs your
service to talk to the platform's license server. unshackle recognizes six DRM classes:
service to talk to the platform's licence server. unshackle recognises six DRM classes:
| DRM class | System | License flow |
| DRM class | System | Licence flow |
|---|---|---|
| `Widevine` | Widevine | CDM challenge → license server → content keys (`.wvd` device) |
| `PlayReady` | PlayReady | CDM challenge (WRM header) → license server → content keys (`.prd` device) |
| `Widevine` | Widevine | CDM challenge → licence server → content keys (`.wvd` device) |
| `PlayReady` | PlayReady | CDM challenge (WRM header) → licence server → content keys (`.prd` device) |
| `ClearKeyCENC` | W3C `org.w3.clearkey` or W3C common PSSH over CENC | JSON KID request → JWK set; no CDM |
| `ClearKey` | HLS AES-128 | content key fetched directly from a URI; no CDM, no challenge |
| `CustomDRM` | a system that a DRM plugin adds | `CustomDRM("<plugin id>", kids=..., data=...)`. For a plugin that holds its key, put the key in `data`. For a plugin that licenses locally, put only the data the plugin reads: unshackle licenses it at the licence step. The plugin decrypts. Its README names the `data` it reads |
| `ClearKeyCTR` | AES-128-CTR over a whole file | the service gives the IV and licenses the content key at the licence step; no CDM, no license server |
| `ClearKeyCTR` | AES-128-CTR over a whole file | the service gives the IV and licenses the content key at the licence step; no CDM, no licence server |
!!! warning "`ClearKey` vs `ClearKeyCENC`"
Despite the shared prefix these are entirely different systems. `ClearKey` is HLS
@@ -459,7 +459,7 @@ When a `--remote` client licenses with its own CDM, the callback on the server g
You do not open CDM sessions or operate shaka-packager yourself. The `Widevine`/`PlayReady`
classes drive the CDM handshake and call the decryption backend. Your callback is only the
"send this challenge, give me back the license" step.
"send this challenge, give me back the licence" step.
### The FairPlay bridge hook
@@ -547,11 +547,11 @@ only such tags stops with `None of the key systems are supported` before it down
### How unshackle chooses a CDM and finds keys
CDM selection is config-driven: the `cdm` map resolves a service tag (and optionally the
The CDM choice comes from config: the `cdm` map resolves a service tag (and optionally the
track quality or DRM type) to a device name, which `load_cdm` instantiates as a local
`.wvd`/`.prd` or a remote CDM. Before ever requesting a license, the framework tries an
in-process cache of content keys and the configured **key vaults**. Only unresolved KIDs
trigger an actual license request, and the framework writes newly licensed keys back to
`.wvd`/`.prd` or a remote CDM. Before ever requesting a licence, the framework tries an
in-process cache of content keys and the configured **key vaults**. The CDM makes a challenge only
for an unresolved KID, and the framework writes newly licensed keys back to
every vault. This is why the same content key is rarely re-licensed twice. Users configure
all of this in [DRM and CDM](../guide/drm-and-cdm.md) and
[Key vaults](../guide/vaults.md). The [DRM API reference](../reference/api/drm.md) gives