mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-06-10 03:02:09 +00:00
fix(hls): resolve per-rendition KID in no-EXT-X-KEY fallback
Manifests that signal DRM only via EXT-X-SESSION-DATA share one session_drm across all renditions, carrying just the manifest-level KID. The fallback licensing path licensed without the track's real KID, so --vaults-only only looked up the shared KID and could not find the rendition's key even when the vault held it (--cdm-only masked this since the license returns all keys). Resolve the KID from the init segment's tenc box and pass it through, matching the EXT-X-KEY path.
This commit is contained in:
@@ -609,8 +609,9 @@ class HLS:
|
|||||||
try:
|
try:
|
||||||
if not license_widevine:
|
if not license_widevine:
|
||||||
raise ValueError("license_widevine func must be supplied to use DRM")
|
raise ValueError("license_widevine func must be supplied to use DRM")
|
||||||
|
track_kid = HLS.get_track_kid_from_init(master, track, session) or session_drm.kid
|
||||||
progress(downloaded="LICENSING")
|
progress(downloaded="LICENSING")
|
||||||
license_widevine(session_drm)
|
license_widevine(session_drm, track_kid=track_kid)
|
||||||
progress(downloaded="[yellow]LICENSED")
|
progress(downloaded="[yellow]LICENSED")
|
||||||
except Exception: # noqa
|
except Exception: # noqa
|
||||||
DOWNLOAD_CANCELLED.set() # skip pending track downloads
|
DOWNLOAD_CANCELLED.set() # skip pending track downloads
|
||||||
|
|||||||
Reference in New Issue
Block a user