mirror of
https://github.com/NohamR/OqeeRewind.git
synced 2026-07-12 06:50:12 +00:00
Cache tokens and improve Oqee login flow
Add local token caching and validation for Oqee client, including _is_token_valid, load_cache and save_cache using .oqee_token.json to reuse valid JWTs and avoid unnecessary re-authentication. Update login() to try loading cache first, keep existing credential/IP login flows with clearer logging and improved fallback/error handling, and save tokens after successful auth. Also add required imports (json, os, time) and minor logging tweak in utils/downloader.py to include the Widevine CDM device filename in the fetch message.
This commit is contained in:
@@ -51,7 +51,8 @@ def get_keys(kids: list[str], method: dict) -> list[str]:
|
||||
keys.append(f"{kid}:{key}")
|
||||
return keys
|
||||
|
||||
logger.info("Fetching DRM keys via Widevine CDM...")
|
||||
cdm_name = (method["device_file"]).split("/")[-1]
|
||||
logger.info(f"Fetching DRM keys via Widevine CDM {cdm_name}...")
|
||||
client = method["client_class"]
|
||||
|
||||
device = Device.load(method["device_file"])
|
||||
|
||||
Reference in New Issue
Block a user