mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-02 13:24:53 +03:00
Ensure environment vars are correctly substituted when dynamically changing go2rtc streams (#22723)
This commit is contained in:
parent
e1245cb93d
commit
f1983b25ca
@ -30,6 +30,7 @@ from frigate.config.camera.updater import (
|
||||
CameraConfigUpdateEnum,
|
||||
CameraConfigUpdateTopic,
|
||||
)
|
||||
from frigate.config.env import FRIGATE_ENV_VARS
|
||||
from frigate.util.builtin import clean_camera_user_pass
|
||||
from frigate.util.camera_cleanup import cleanup_camera_db, cleanup_camera_files
|
||||
from frigate.util.config import find_config_file
|
||||
@ -124,7 +125,10 @@ def go2rtc_add_stream(request: Request, stream_name: str, src: str = ""):
|
||||
try:
|
||||
params = {"name": stream_name}
|
||||
if src:
|
||||
params["src"] = src
|
||||
try:
|
||||
params["src"] = src.format(**FRIGATE_ENV_VARS)
|
||||
except KeyError:
|
||||
params["src"] = src
|
||||
|
||||
r = requests.put(
|
||||
"http://127.0.0.1:1984/api/streams",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user