Fixed 640kbps audio AMZN
This commit is contained in:
parent
88a682d1ef
commit
35dfeb8f7d
@ -20,7 +20,7 @@ I AM NOT taking credit for the entirety of this project. This project is based o
|
|||||||
|
|
||||||
1. Install Microsoft Visual C++ Redistributable - [link](https://aka.ms/vs/17/release/vc_redist.x64.exe).
|
1. Install Microsoft Visual C++ Redistributable - [link](https://aka.ms/vs/17/release/vc_redist.x64.exe).
|
||||||
|
|
||||||
2. Ensure Python is installed in your system (cannot be from the the Microsoft Store). Refer to [link](https://www.python.org/downloads/) or on Ubuntu -> `sudo apt install python3`. I recommend python 3.10 or higher.
|
2. Ensure Python is installed in your system (cannot be from the the Microsoft Store). Refer to [link](https://www.python.org/downloads/) or on Ubuntu -> `sudo apt install python3`. I recommend python 3.10.11 (or higher).
|
||||||
|
|
||||||
3. Make sure git is installed in your system by running `git --version`. If not refer to [link](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
|
3. Make sure git is installed in your system by running `git --version`. If not refer to [link](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
|
||||||
|
|
||||||
|
@ -126,6 +126,7 @@ def get_cdm(log, service, profile=None, cdm_name=None):
|
|||||||
|
|
||||||
def get_service_config(service):
|
def get_service_config(service):
|
||||||
"""Get both service config and service secrets as one merged dictionary."""
|
"""Get both service config and service secrets as one merged dictionary."""
|
||||||
|
print(filenames.service_config.format(service=service.lower()))
|
||||||
service_config = load_yaml(filenames.service_config.format(service=service.lower()))
|
service_config = load_yaml(filenames.service_config.format(service=service.lower()))
|
||||||
|
|
||||||
user_config = (load_yaml(filenames.user_service_config.format(service=service.lower())) or load_yaml(filenames.user_service_config.format(service=service)))
|
user_config = (load_yaml(filenames.user_service_config.format(service=service.lower())) or load_yaml(filenames.user_service_config.format(service=service)))
|
||||||
@ -499,24 +500,28 @@ def result(ctx, service, quality, range_, wanted, alang, slang, audio_only, subs
|
|||||||
session_id=session_id
|
session_id=session_id
|
||||||
) or ctx.obj.cdm.common_privacy_cert
|
) or ctx.obj.cdm.common_privacy_cert
|
||||||
)
|
)
|
||||||
ctx.obj.cdm.parse_license(
|
license = service.license(
|
||||||
session_id,
|
|
||||||
service.license(
|
|
||||||
challenge=ctx.obj.cdm.get_license_challenge(session_id=session_id, pssh=PSSHWV(track.psshWV)),
|
challenge=ctx.obj.cdm.get_license_challenge(session_id=session_id, pssh=PSSHWV(track.psshWV)),
|
||||||
title=title,
|
title=title,
|
||||||
track=track,
|
track=track,
|
||||||
session_id=session_id
|
session_id=session_id
|
||||||
)
|
)
|
||||||
|
assert license
|
||||||
|
ctx.obj.cdm.parse_license(
|
||||||
|
session_id,
|
||||||
|
license
|
||||||
)
|
)
|
||||||
elif "common_privacy_cert" not in dir(ctx.obj.cdm) and track.psshPR:
|
elif "common_privacy_cert" not in dir(ctx.obj.cdm) and track.psshPR:
|
||||||
challenge = ctx.obj.cdm.get_license_challenge(session_id, PSSH(track.psshPR).wrm_headers[0])
|
challenge = ctx.obj.cdm.get_license_challenge(session_id, PSSH(track.psshPR).wrm_headers[0])
|
||||||
ctx.obj.cdm.parse_license(
|
license = service.license(
|
||||||
session_id,
|
|
||||||
service.license(
|
|
||||||
challenge=challenge,
|
challenge=challenge,
|
||||||
title=title,
|
title=title,
|
||||||
track=track,
|
track=track,
|
||||||
) # expects the XML License not base64 encoded str.
|
)
|
||||||
|
assert license
|
||||||
|
ctx.obj.cdm.parse_license(
|
||||||
|
session_id,
|
||||||
|
license # expects the XML License not base64 encoded str.
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
raise log.exit("Unable to license")
|
raise log.exit("Unable to license")
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -860,7 +860,7 @@ class Amazon(BaseService):
|
|||||||
"deviceStreamingTechnologyOverride": manifest_type if manifest_type else "DASH",
|
"deviceStreamingTechnologyOverride": manifest_type if manifest_type else "DASH",
|
||||||
"deviceProtocolOverride": "Https",
|
"deviceProtocolOverride": "Https",
|
||||||
"deviceVideoCodecOverride": video_codec,
|
"deviceVideoCodecOverride": video_codec,
|
||||||
#"deviceBitrateAdaptationsOverride": bitrate_mode.replace("+", ","),
|
"deviceBitrateAdaptationsOverride": bitrate_mode.replace("+", ","),
|
||||||
"deviceVideoQualityOverride": quality,
|
"deviceVideoQualityOverride": quality,
|
||||||
"deviceHdrFormatsOverride": self.VIDEO_RANGE_MAP.get(hdr, "None"),
|
"deviceHdrFormatsOverride": self.VIDEO_RANGE_MAP.get(hdr, "None"),
|
||||||
"supportedDRMKeyScheme": "DUAL_KEY", # ?
|
"supportedDRMKeyScheme": "DUAL_KEY", # ?
|
||||||
@ -1235,7 +1235,7 @@ class Amazon(BaseService):
|
|||||||
if response_json["token_type"] != "bearer":
|
if response_json["token_type"] != "bearer":
|
||||||
raise self.log.exit("Unexpected returned refreshed token type")
|
raise self.log.exit("Unexpected returned refreshed token type")
|
||||||
|
|
||||||
return response
|
return response_json
|
||||||
|
|
||||||
def get_csrf_token(self) -> str:
|
def get_csrf_token(self) -> str:
|
||||||
"""
|
"""
|
||||||
|
@ -19,8 +19,9 @@ from sys import platform
|
|||||||
|
|
||||||
def load_yaml(path):
|
def load_yaml(path):
|
||||||
if not os.path.isfile(path):
|
if not os.path.isfile(path):
|
||||||
|
#print(f"Service config does not exist -> {path}")
|
||||||
return {}
|
return {}
|
||||||
with open(path) as fd:
|
with open(path, 'r') as fd:
|
||||||
return yaml.safe_load(fd)
|
return yaml.safe_load(fd)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user