You've already forked RadioPlayer
mirror of
https://github.com/radio95-rnt/RadioPlayer.git
synced 2026-02-27 06:03:52 +01:00
fix
This commit is contained in:
@@ -33,9 +33,9 @@ class APIHandler(BaseHTTPRequestHandler):
|
|||||||
time.sleep(0.05) # Wait briefly to avoid a busy loop
|
time.sleep(0.05) # Wait briefly to avoid a busy loop
|
||||||
if response_json:
|
if response_json:
|
||||||
try:
|
try:
|
||||||
rdata = json.loads(response_json)
|
rdata = response_json
|
||||||
if "error" in rdata: code = 500 # Server error if module reported one
|
if "error" in repr(rdata): code = 500 # Server error if module reported one
|
||||||
except (json.JSONDecodeError, TypeError):
|
except TypeError:
|
||||||
rdata = {"error": "Invalid data format from module"}
|
rdata = {"error": "Invalid data format from module"}
|
||||||
code = 500
|
code = 500
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user