From db7bea79513c5411ff6dab59150b441b3f6aab45 Mon Sep 17 00:00:00 2001 From: voldemort <5692900+yell0wsuit@users.noreply.github.com> Date: Wed, 23 Jul 2025 18:00:28 +0700 Subject: [PATCH] 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. --- custom_functions/decrypt/api_decrypt.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_functions/decrypt/api_decrypt.py b/custom_functions/decrypt/api_decrypt.py index 91857d7..694098b 100644 --- a/custom_functions/decrypt/api_decrypt.py +++ b/custom_functions/decrypt/api_decrypt.py @@ -314,8 +314,8 @@ def api_decrypt( } # Prepare proxies - proxies = None - if proxy is not None: + proxies = "" + if proxy != "": is_url, protocol, fqdn = is_url_and_split(proxy) if is_url: proxies = {"http": proxy, "https": proxy} @@ -380,7 +380,7 @@ def api_decrypt( json_data, is_widevine=(not is_pr), ) - if returned_keys is None: + if returned_keys == "": return {"status": "error", "message": key_err} # Close session