mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-10 02:29:19 +03:00
Compare commits
2 Commits
7d868a5c00
...
846c806bab
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
846c806bab | ||
|
|
bf0d985b9d |
@ -65,7 +65,9 @@ def _is_valid_host(host: str) -> bool:
|
||||
|
||||
@router.get("/go2rtc/streams", dependencies=[Depends(allow_any_authenticated())])
|
||||
def go2rtc_streams():
|
||||
r = requests.get("http://127.0.0.1:1984/api/streams")
|
||||
r = requests.get(
|
||||
"http://127.0.0.1:1984/api/streams", proxies={"http": None, "https": None}
|
||||
)
|
||||
if not r.ok:
|
||||
logger.error("Failed to fetch streams from go2rtc")
|
||||
return JSONResponse(
|
||||
@ -84,7 +86,8 @@ def go2rtc_streams():
|
||||
)
|
||||
def go2rtc_camera_stream(request: Request, camera_name: str):
|
||||
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",
|
||||
proxies={"http": None, "https": None},
|
||||
)
|
||||
if not r.ok:
|
||||
camera_config = request.app.frigate_config.cameras.get(camera_name)
|
||||
@ -116,6 +119,7 @@ def go2rtc_add_stream(request: Request, stream_name: str, src: str = ""):
|
||||
"http://127.0.0.1:1984/api/streams",
|
||||
params=params,
|
||||
timeout=10,
|
||||
proxies={"http": None, "https": None},
|
||||
)
|
||||
if not r.ok:
|
||||
logger.error(f"Failed to add go2rtc stream {stream_name}: {r.text}")
|
||||
@ -151,6 +155,7 @@ def go2rtc_delete_stream(stream_name: str):
|
||||
"http://127.0.0.1:1984/api/streams",
|
||||
params={"src": stream_name},
|
||||
timeout=10,
|
||||
proxies={"http": None, "https": None},
|
||||
)
|
||||
if not r.ok:
|
||||
logger.error(f"Failed to delete go2rtc stream {stream_name}: {r.text}")
|
||||
|
||||
@ -711,7 +711,11 @@ def auto_detect_hwaccel() -> str:
|
||||
try:
|
||||
cuda = False
|
||||
vaapi = False
|
||||
resp = requests.get("http://127.0.0.1:1984/api/ffmpeg/hardware", timeout=3)
|
||||
resp = requests.get(
|
||||
"http://127.0.0.1:1984/api/ffmpeg/hardware",
|
||||
timeout=3,
|
||||
proxies={"http": None, "https": None},
|
||||
)
|
||||
|
||||
if resp.status_code == 200:
|
||||
data: dict[str, list[dict[str, str]]] = resp.json()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user