forked from kenzuya/unshackle
fix(n_m3u8dl_re): pass all content keys for DualKey DRM decryption
This commit is contained in:
@@ -192,8 +192,10 @@ def build_download_args(
|
|||||||
if ad_keyword:
|
if ad_keyword:
|
||||||
args["--ad-keyword"] = ad_keyword
|
args["--ad-keyword"] = ad_keyword
|
||||||
|
|
||||||
|
key_args = []
|
||||||
if content_keys:
|
if content_keys:
|
||||||
args["--key"] = next((f"{kid.hex}:{key.lower()}" for kid, key in content_keys.items()), None)
|
for kid, key in content_keys.items():
|
||||||
|
key_args.extend(["--key", f"{kid.hex}:{key.lower()}"])
|
||||||
|
|
||||||
decryption_config = config.decryption.lower()
|
decryption_config = config.decryption.lower()
|
||||||
engine_name = DECRYPTION_ENGINE.get(decryption_config) or "SHAKA_PACKAGER"
|
engine_name = DECRYPTION_ENGINE.get(decryption_config) or "SHAKA_PACKAGER"
|
||||||
@@ -221,6 +223,9 @@ def build_download_args(
|
|||||||
elif value is not False and value is not None:
|
elif value is not False and value is not None:
|
||||||
command.extend([flag, str(value)])
|
command.extend([flag, str(value)])
|
||||||
|
|
||||||
|
# Append all content keys (multiple --key flags supported by N_m3u8DL-RE)
|
||||||
|
command.extend(key_args)
|
||||||
|
|
||||||
if headers:
|
if headers:
|
||||||
for key, value in headers.items():
|
for key, value in headers.items():
|
||||||
if key.lower() not in ("accept-encoding", "cookie"):
|
if key.lower() not in ("accept-encoding", "cookie"):
|
||||||
|
|||||||
Reference in New Issue
Block a user