mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-25 10:25:09 +00:00
fix(hls): read the key id from the init segment when the PSSH has none
An EXT-X-KEY whose Widevine PSSH holds a content id and no key id raised KIDNotFound. Covers download, licence-only, --all-drm, session keys, import and the server CDM path. Fixes #166.
This commit is contained in:
@@ -4327,7 +4327,7 @@ def ensure_track_drm(track: Any, session: Any = None, init_data: Optional[bytes]
|
||||
keys = [k for k in (playlist.keys or []) + (playlist.session_keys or []) if k is not None]
|
||||
for key in keys:
|
||||
try:
|
||||
drm = HLS.get_drm(key)
|
||||
drm = HLS.get_drm_or_probe(key, playlist, track, probe_session=http)
|
||||
if isinstance(drm, (Widevine, PlayReady)):
|
||||
track.drm = [drm]
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user