forked from tpd94/CDRM-Project
Refactor proxy handling in api_decrypt.py to use an empty string instead of None for improved consistency; update returned_keys check to compare against an empty string for better error handling.
This commit is contained in:
parent
7f9f04d829
commit
db7bea7951
@ -314,8 +314,8 @@ def api_decrypt(
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Prepare proxies
|
# Prepare proxies
|
||||||
proxies = None
|
proxies = ""
|
||||||
if proxy is not None:
|
if proxy != "":
|
||||||
is_url, protocol, fqdn = is_url_and_split(proxy)
|
is_url, protocol, fqdn = is_url_and_split(proxy)
|
||||||
if is_url:
|
if is_url:
|
||||||
proxies = {"http": proxy, "https": proxy}
|
proxies = {"http": proxy, "https": proxy}
|
||||||
@ -380,7 +380,7 @@ def api_decrypt(
|
|||||||
json_data,
|
json_data,
|
||||||
is_widevine=(not is_pr),
|
is_widevine=(not is_pr),
|
||||||
)
|
)
|
||||||
if returned_keys is None:
|
if returned_keys == "":
|
||||||
return {"status": "error", "message": key_err}
|
return {"status": "error", "message": key_err}
|
||||||
|
|
||||||
# Close session
|
# Close session
|
||||||
|
Loading…
x
Reference in New Issue
Block a user