From 2e2f8f5099555dd4f44e8919f53ed095af65e287 Mon Sep 17 00:00:00 2001 From: TPD94 Date: Mon, 29 Sep 2025 20:48:59 -0400 Subject: [PATCH] Fix remoteCDM, add curl_cffi to instance check --- .gitignore | 6 ++++++ .idea/.gitignore | 8 ++++++++ unshackle/commands/dl.py | 12 ++++++++---- unshackle/core/manifests/dash.py | 2 +- 4 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 .idea/.gitignore diff --git a/.gitignore b/.gitignore index 26a73b6..b84292e 100644 --- a/.gitignore +++ b/.gitignore @@ -235,3 +235,9 @@ cython_debug/ marimo/_static/ marimo/_lsp/ __marimo__/ +.idea/vcs.xml +.idea/unshackle.iml +.idea/modules.xml +.idea/misc.xml +.idea/inspectionProfiles/Project_Default.xml +.idea/inspectionProfiles/profiles_settings.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/unshackle/commands/dl.py b/unshackle/commands/dl.py index 9a99bfc..06d1b71 100644 --- a/unshackle/commands/dl.py +++ b/unshackle/commands/dl.py @@ -1701,10 +1701,14 @@ class dl: # All DecryptLabs CDMs use DecryptLabsRemoteCDM return DecryptLabsRemoteCDM(service_name=service, vaults=self.vaults, **cdm_api) else: - del cdm_api["name"] - if "type" in cdm_api: - del cdm_api["type"] - return RemoteCdm(**cdm_api) + 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'], + ) prd_path = config.directories.prds / f"{cdm_name}.prd" if not prd_path.is_file(): diff --git a/unshackle/core/manifests/dash.py b/unshackle/core/manifests/dash.py index ec19e25..67ef362 100644 --- a/unshackle/core/manifests/dash.py +++ b/unshackle/core/manifests/dash.py @@ -253,7 +253,7 @@ class DASH: ): if not session: session = Session() - elif not isinstance(session, Session): + elif not isinstance(session, (Session, CurlSession)): raise TypeError(f"Expected session to be a {Session}, not {session!r}") if proxy: