diff --git a/README.md b/README.md index 5d282c1..6c00263 100644 --- a/README.md +++ b/README.md @@ -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). -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) diff --git a/vinetrimmer/commands/dl.py b/vinetrimmer/commands/dl.py index a50be7f..44bdcdc 100644 --- a/vinetrimmer/commands/dl.py +++ b/vinetrimmer/commands/dl.py @@ -126,6 +126,7 @@ def get_cdm(log, service, profile=None, cdm_name=None): def get_service_config(service): """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())) 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 ) or ctx.obj.cdm.common_privacy_cert ) - ctx.obj.cdm.parse_license( - session_id, - service.license( + license = service.license( challenge=ctx.obj.cdm.get_license_challenge(session_id=session_id, pssh=PSSHWV(track.psshWV)), title=title, track=track, 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: challenge = ctx.obj.cdm.get_license_challenge(session_id, PSSH(track.psshPR).wrm_headers[0]) - ctx.obj.cdm.parse_license( - session_id, - service.license( + license = service.license( challenge=challenge, title=title, 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: raise log.exit("Unable to license") diff --git a/vinetrimmer/devices/hisense_smarttv_he55a7000euwts_sl3000.prd b/vinetrimmer/devices/hisense_smarttv_he55a7000euwts_sl3000.prd index 50da192..0c1b3a2 100644 Binary files a/vinetrimmer/devices/hisense_smarttv_he55a7000euwts_sl3000.prd and b/vinetrimmer/devices/hisense_smarttv_he55a7000euwts_sl3000.prd differ diff --git a/vinetrimmer/key_store.db b/vinetrimmer/key_store.db index 313cc8c..4274ba6 100644 Binary files a/vinetrimmer/key_store.db and b/vinetrimmer/key_store.db differ diff --git a/vinetrimmer/services/amazon.py b/vinetrimmer/services/amazon.py index 09e1686..97517c0 100644 --- a/vinetrimmer/services/amazon.py +++ b/vinetrimmer/services/amazon.py @@ -860,7 +860,7 @@ class Amazon(BaseService): "deviceStreamingTechnologyOverride": manifest_type if manifest_type else "DASH", "deviceProtocolOverride": "Https", "deviceVideoCodecOverride": video_codec, - #"deviceBitrateAdaptationsOverride": bitrate_mode.replace("+", ","), + "deviceBitrateAdaptationsOverride": bitrate_mode.replace("+", ","), "deviceVideoQualityOverride": quality, "deviceHdrFormatsOverride": self.VIDEO_RANGE_MAP.get(hdr, "None"), "supportedDRMKeyScheme": "DUAL_KEY", # ? @@ -1235,7 +1235,7 @@ class Amazon(BaseService): if response_json["token_type"] != "bearer": raise self.log.exit("Unexpected returned refreshed token type") - return response + return response_json def get_csrf_token(self) -> str: """ diff --git a/vinetrimmer/utils/io.py b/vinetrimmer/utils/io.py index be5ea1b..484a385 100644 --- a/vinetrimmer/utils/io.py +++ b/vinetrimmer/utils/io.py @@ -19,8 +19,9 @@ from sys import platform def load_yaml(path): if not os.path.isfile(path): + #print(f"Service config does not exist -> {path}") return {} - with open(path) as fd: + with open(path, 'r') as fd: return yaml.safe_load(fd)