mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 01:35:22 +03:00
don't assume roles is defined
This commit is contained in:
parent
a728fbe4ef
commit
49e1745305
@ -593,7 +593,7 @@ class CameraConfig(FrigateBaseModel):
|
|||||||
|
|
||||||
# add roles to the input if there is only one
|
# add roles to the input if there is only one
|
||||||
if len(config["ffmpeg"]["inputs"]) == 1:
|
if len(config["ffmpeg"]["inputs"]) == 1:
|
||||||
has_rtmp = "rtmp" in config["ffmpeg"]["inputs"][0]["roles"]
|
has_rtmp = "rtmp" in config["ffmpeg"]["inputs"][0].get("roles", [])
|
||||||
|
|
||||||
config["ffmpeg"]["inputs"][0]["roles"] = [
|
config["ffmpeg"]["inputs"][0]["roles"] = [
|
||||||
"record",
|
"record",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user