From 7bb215d4963a34be96cf38b2a59c704caa509066 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Wed, 8 Mar 2023 22:48:36 +0000 Subject: [PATCH] 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 --- devine/commands/dl.py | 1 + 1 file changed, 1 insertion(+) diff --git a/devine/commands/dl.py b/devine/commands/dl.py index 758aeb9..5ffa3f5 100644 --- a/devine/commands/dl.py +++ b/devine/commands/dl.py @@ -691,6 +691,7 @@ class dl: cached_keys = self.vaults.add_keys(drm.content_keys) 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: msg = f"No Content Key for KID {track_kid.hex} was returned in the License"