Specify URL Track Key IDs to prepare_drm

This commit is contained in:
rlaphoenix 2023-03-08 22:42:25 +00:00
parent a549cc6afb
commit da7acb0417
1 changed files with 2 additions and 1 deletions

View File

@ -798,12 +798,13 @@ class dl:
self.log.warning("No Widevine PSSH was found for this track, is it DRM free?")
if track.drm:
track_kid = track.get_key_id(session=service.session)
drm = track.drm[0] # just use the first supported DRM system for now
if isinstance(drm, Widevine):
# license and grab content keys
if not prepare_drm:
raise ValueError("prepare_drm func must be supplied to use Widevine DRM")
prepare_drm(drm)
prepare_drm(drm, track_kid=track_kid)
else:
drm = None