Add manual camera refresh control
This commit is contained in:
@@ -1660,6 +1660,19 @@ class CameraControlBridge:
|
||||
self.send_response(401)
|
||||
self.end_headers()
|
||||
return
|
||||
if parsed.path == "/refresh":
|
||||
try:
|
||||
bridge.refresh_frigate_inventory()
|
||||
token_param = urllib.parse.parse_qs(parsed.query).get("token", [None])[0]
|
||||
token_query = f"&token={urllib.parse.quote(token_param)}" if token_param else ""
|
||||
self.send_response(303)
|
||||
self.send_header("Location", f"/?lang={urllib.parse.quote(lang)}{token_query}")
|
||||
self.end_headers()
|
||||
except Exception as exc:
|
||||
self.send_response(500)
|
||||
self.end_headers()
|
||||
self.wfile.write(str(exc).encode("utf-8"))
|
||||
return
|
||||
parts = parsed.path.strip("/").split("/")
|
||||
if len(parts) == 3 and parts[0] == "action":
|
||||
action_id = urllib.parse.unquote(parts[1])
|
||||
|
||||
Reference in New Issue
Block a user