From 44acfbdc89f29db8cc9754b6704fc2e6fbb24425 Mon Sep 17 00:00:00 2001 From: Andy Date: Thu, 15 Jan 2026 12:48:18 +0000 Subject: [PATCH] fix(drm): correct PSSH system ID comparison in PlayReady Remove erroneous `.bytes` accessor from PSSH.SYSTEM_ID comparisons in from_track() and from_init_data() methods. The pyplayready PSSH.SYSTEM_ID is already the correct type for comparison with parsed PSSH box system_ID values. --- unshackle/core/drm/playready.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unshackle/core/drm/playready.py b/unshackle/core/drm/playready.py index b1fcea0..7376764 100644 --- a/unshackle/core/drm/playready.py +++ b/unshackle/core/drm/playready.py @@ -168,7 +168,7 @@ class PlayReady: pssh_boxes.extend(list(get_boxes(init_data, b"pssh"))) tenc_boxes.extend(list(get_boxes(init_data, b"tenc"))) - pssh = next((b for b in pssh_boxes if b.system_ID == PSSH.SYSTEM_ID.bytes), None) + pssh = next((b for b in pssh_boxes if b.system_ID == PSSH.SYSTEM_ID), None) if not pssh: raise PlayReady.Exceptions.PSSHNotFound("PSSH was not found in track data.") @@ -197,7 +197,7 @@ class PlayReady: if enc_key_id: kid = UUID(bytes=base64.b64decode(enc_key_id)) - pssh = next((b for b in pssh_boxes if b.system_ID == PSSH.SYSTEM_ID.bytes), None) + pssh = next((b for b in pssh_boxes if b.system_ID == PSSH.SYSTEM_ID), None) if not pssh: raise PlayReady.Exceptions.PSSHNotFound("PSSH was not found in track data.")