mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-06-09 01:16:08 +02:00
Don't log go2rtc failure when camera is disabled
This commit is contained in:
parent
0308a88111
commit
9bdcc2e24c
@ -80,12 +80,14 @@ def go2rtc_streams():
|
|||||||
|
|
||||||
|
|
||||||
@router.get("/go2rtc/streams/{camera_name}")
|
@router.get("/go2rtc/streams/{camera_name}")
|
||||||
def go2rtc_camera_stream(camera_name: str):
|
def go2rtc_camera_stream(request: Request, camera_name: str):
|
||||||
r = requests.get(
|
r = requests.get(
|
||||||
f"http://127.0.0.1:1984/api/streams?src={camera_name}&video=all&audio=allµphone"
|
f"http://127.0.0.1:1984/api/streams?src={camera_name}&video=all&audio=allµphone"
|
||||||
)
|
)
|
||||||
if not r.ok:
|
if not r.ok:
|
||||||
logger.error("Failed to fetch streams from go2rtc")
|
if request.app.frigate_config.cameras.get(camera_name, {}).get("enabled", True):
|
||||||
|
logger.error("Failed to fetch streams from go2rtc")
|
||||||
|
|
||||||
return JSONResponse(
|
return JSONResponse(
|
||||||
content=({"success": False, "message": "Error fetching stream data"}),
|
content=({"success": False, "message": "Error fetching stream data"}),
|
||||||
status_code=500,
|
status_code=500,
|
||||||
|
Loading…
Reference in New Issue
Block a user