Prevent licensing Widevine DRM a second time

If you use --cdm-only, you will end up licensing multiple times if the PSSH has more than one Key ID. While this is checked for, with the KID check now being more lenient, it will end up continuing and licensing again.

However, even with the original check code this would have been pointless. If the first license did not return a content key for a KID, then the next license call with the exact same parameters wouldn't have either
This commit is contained in:
rlaphoenix 2023-03-08 22:48:36 +00:00
parent abf6c71688
commit 7bb215d496
1 changed files with 1 additions and 0 deletions

View File

@ -691,6 +691,7 @@ class dl:
cached_keys = self.vaults.add_keys(drm.content_keys) cached_keys = self.vaults.add_keys(drm.content_keys)
self.log.info(f" + Newly added to {cached_keys}/{len(drm.content_keys)} Vaults") self.log.info(f" + Newly added to {cached_keys}/{len(drm.content_keys)} Vaults")
break # licensing twice will be unnecessary
if track_kid and track_kid not in drm.content_keys: if track_kid and track_kid not in drm.content_keys:
msg = f"No Content Key for KID {track_kid.hex} was returned in the License" msg = f"No Content Key for KID {track_kid.hex} was returned in the License"