This commit is contained in:
Sp5rky
2025-09-30 12:54:25 -06:00
2 changed files with 11 additions and 7 deletions

View File

@@ -213,7 +213,7 @@ class dl:
@click.option( @click.option(
"--sub-format", "--sub-format",
type=SubtitleCodecChoice(Subtitle.Codec), type=SubtitleCodecChoice(Subtitle.Codec),
default="srt", default=None,
help="Set Output Subtitle Format, only converting if necessary.", help="Set Output Subtitle Format, only converting if necessary.",
) )
@click.option("-V", "--video-only", is_flag=True, default=False, help="Only download video tracks.") @click.option("-V", "--video-only", is_flag=True, default=False, help="Only download video tracks.")
@@ -1701,10 +1701,14 @@ class dl:
# All DecryptLabs CDMs use DecryptLabsRemoteCDM # All DecryptLabs CDMs use DecryptLabsRemoteCDM
return DecryptLabsRemoteCDM(service_name=service, vaults=self.vaults, **cdm_api) return DecryptLabsRemoteCDM(service_name=service, vaults=self.vaults, **cdm_api)
else: else:
del cdm_api["name"] return RemoteCdm(
if "type" in cdm_api: device_type=cdm_api['Device Type'],
del cdm_api["type"] system_id=cdm_api['System ID'],
return RemoteCdm(**cdm_api) 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" prd_path = config.directories.prds / f"{cdm_name}.prd"
if not prd_path.is_file(): if not prd_path.is_file():

View File

@@ -253,8 +253,8 @@ class DASH:
): ):
if not session: if not session:
session = 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}") raise TypeError(f"Expected session to be a {Session} or {CurlSession}, not {session!r}")
if proxy: if proxy:
session.proxies.update({"all": proxy}) session.proxies.update({"all": proxy})