refactor(drm): resolve content keys in one licence path behind ServerKeySource

Drop null keys from every licence, server and export source, not only Widevine. dl now finds remote sessions and imports through ServerKeySource instead of private fields.
This commit is contained in:
imSp4rky
2026-11-02 21:13:23 -07:00
parent d8a4950b99
commit c4677341c8
15 changed files with 463 additions and 491 deletions
-6
View File
@@ -98,12 +98,6 @@ These are abstract. A service will not load unless it defines all three:
- **Event callbacks**: `on_segment_downloaded`, `on_track_downloaded`,
`on_track_decrypted`, `on_track_repacked`, `on_track_multiplex` let a service react to
pipeline events.
- **`resolve_server_keys(title)`**: an escape hatch for services whose decryption keys are
resolved server-side *ahead of* the normal per-track license flow. Unlike everything else
here it is **not declared on the `Service` base class at all**: `dl.py` probes for it with
`hasattr` and calls it (once, after track selection) only if your service defines it. Use
it when your service must fetch or inject keys in bulk before download, separate from
the per-track license callbacks below.
### What `__init__` wires up for you