Another possible fix for DSNP KID
This commit is contained in:
parent
e3e5f7bedb
commit
b73b43163c
@ -594,7 +594,7 @@ def result(ctx, service, quality, closest_resolution, range_, wanted, alang, sla
|
|||||||
# TODO: Move decryption code to Track
|
# TODO: Move decryption code to Track
|
||||||
if not config.decrypter:
|
if not config.decrypter:
|
||||||
raise log.exit(" - No decrypter specified")
|
raise log.exit(" - No decrypter specified")
|
||||||
if config.decrypter == "packager" and not (track.descriptor == Track.Descriptor.ISM):
|
if service_name == "DisneyPlus" or (config.decrypter == "packager" and not (track.descriptor == Track.Descriptor.ISM)) :
|
||||||
platform = {"win32": "win", "darwin": "osx"}.get(sys.platform, sys.platform)
|
platform = {"win32": "win", "darwin": "osx"}.get(sys.platform, sys.platform)
|
||||||
names = ["shaka-packager", "packager", f"packager-{platform}"]
|
names = ["shaka-packager", "packager", f"packager-{platform}"]
|
||||||
executable = next((x for x in (shutil.which(x) for x in names) if x), None)
|
executable = next((x for x in (shutil.which(x) for x in names) if x), None)
|
||||||
@ -617,13 +617,13 @@ def result(ctx, service, quality, closest_resolution, range_, wanted, alang, sla
|
|||||||
f"label=0:key_id={track.kid.lower()}:key={track.key.lower()}",
|
f"label=0:key_id={track.kid.lower()}:key={track.key.lower()}",
|
||||||
# Apple TV+ needs this as shaka pulls the incorrect KID, idk why
|
# Apple TV+ needs this as shaka pulls the incorrect KID, idk why
|
||||||
f"label=1:key_id=00000000000000000000000000000000:key={track.key.lower()}",
|
f"label=1:key_id=00000000000000000000000000000000:key={track.key.lower()}",
|
||||||
]),
|
]) if service_name != "DisneyPlus" else ",".join(["label={index}:key_id={key}:key={content_keys[key]}" for index, key in enumerate(content_keys)]),
|
||||||
"--temp_dir", directories.temp
|
"--temp_dir", directories.temp
|
||||||
], check=True)
|
], check=True)
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
raise log.exit(" - Failed!")
|
raise log.exit(" - Failed!")
|
||||||
|
|
||||||
elif config.decrypter == "mp4decrypt" or (track.descriptor == Track.Descriptor.ISM):
|
elif service_name != "DisneyPlus" or (config.decrypter == "mp4decrypt" or (track.descriptor == Track.Descriptor.ISM)):
|
||||||
executable = shutil.which("mp4decrypt")
|
executable = shutil.which("mp4decrypt")
|
||||||
if not executable:
|
if not executable:
|
||||||
raise log.exit(" - Unable to find mp4decrypt binary")
|
raise log.exit(" - Unable to find mp4decrypt binary")
|
||||||
|
|||||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user