include ffmpeg_cmds in config endpoint

This commit is contained in:
Blake Blackshear 2021-07-09 20:22:11 -05:00
parent ebee204ca0
commit 6b26fc753e

View File

@ -277,7 +277,16 @@ def events():
@bp.route("/config")
def config():
return jsonify(current_app.frigate_config.dict())
config = current_app.frigate_config.dict()
# add in the ffmpeg_cmds
for camera_name, camera in current_app.frigate_config.cameras.items():
camera_dict = config["cameras"][camera_name]
camera_dict["ffmpeg_cmds"] = camera.ffmpeg_cmds
for cmd in camera_dict["ffmpeg_cmds"]:
cmd["cmd"] = " ".join(cmd["cmd"])
return jsonify(config)
@bp.route("/config/schema")