From 4bc2e93d09098c4b4e16651e6132b626ab3f2f4f Mon Sep 17 00:00:00 2001 From: Andy Date: Sat, 7 Feb 2026 19:00:12 -0700 Subject: [PATCH] fix(dl): support snake_case keys for RemoteCdm Use safe get() fallbacks for RemoteCdm config keys and default security_level to 3000 to avoid KeyError when snake_case is used. --- unshackle/commands/dl.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/unshackle/commands/dl.py b/unshackle/commands/dl.py index 21b77e5..4efc2bf 100644 --- a/unshackle/commands/dl.py +++ b/unshackle/commands/dl.py @@ -2711,12 +2711,12 @@ class dl: ) else: return RemoteCdm( - device_type=cdm_api["Device Type"], - system_id=cdm_api["System ID"], - security_level=cdm_api["Security Level"], - host=cdm_api["Host"], - secret=cdm_api["Secret"], - device_name=cdm_api["Device Name"], + device_type=cdm_api.get("Device Type", cdm_api.get("device_type", "")), + system_id=cdm_api.get("System ID", cdm_api.get("system_id", "")), + security_level=cdm_api.get("Security Level", cdm_api.get("security_level", 3000)), + host=cdm_api.get("Host", cdm_api.get("host")), + secret=cdm_api.get("Secret", cdm_api.get("secret")), + device_name=cdm_api.get("Device Name", cdm_api.get("device_name")), ) prd_path = config.directories.prds / f"{cdm_name}.prd"