From ceea4ac8277c2a990cfae2e3bdf5fd312c50db64 Mon Sep 17 00:00:00 2001 From: TPD94 <39639333+TPD94@users.noreply.github.com> Date: Mon, 29 Sep 2025 22:57:42 -0400 Subject: [PATCH] Fixed RemoteCDM, added curl_cffi to instance checks. (#18) * Fix remoteCDM, add curl_cffi to instance check * Update dash.py --- unshackle/commands/dl.py | 12 ++++++++---- unshackle/core/manifests/dash.py | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) 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..56fec08 100644 --- a/unshackle/core/manifests/dash.py +++ b/unshackle/core/manifests/dash.py @@ -253,8 +253,8 @@ class DASH: ): if not session: session = Session() - elif not isinstance(session, Session): - raise TypeError(f"Expected session to be a {Session}, not {session!r}") + elif not isinstance(session, (Session, CurlSession)): + raise TypeError(f"Expected session to be a {Session} or {CurlSession}, not {session!r}") if proxy: session.proxies.update({"all": proxy})