mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-05 13:07:44 +03:00
config migrator
This commit is contained in:
parent
9eb87e2f44
commit
91e6c7ae91
@ -319,6 +319,21 @@ def migrate_016_0(config: dict[str, dict[str, any]]) -> dict[str, dict[str, any]
|
|||||||
|
|
||||||
camera_config["live"] = live_config
|
camera_config["live"] = live_config
|
||||||
|
|
||||||
|
# add another value to movement_weights for autotracking cams
|
||||||
|
onvif_config = camera_config.get("onvif", {})
|
||||||
|
if "autotracking" in onvif_config:
|
||||||
|
movement_weights = (
|
||||||
|
camera_config.get("onvif", {})
|
||||||
|
.get("autotracking")
|
||||||
|
.get("movement_weights", {})
|
||||||
|
)
|
||||||
|
|
||||||
|
if movement_weights and len(movement_weights.split(",")) == 5:
|
||||||
|
onvif_config["autotracking"]["movement_weights"] = (
|
||||||
|
movement_weights + ", 1"
|
||||||
|
)
|
||||||
|
camera_config["onvif"] = onvif_config
|
||||||
|
|
||||||
new_config["cameras"][name] = camera_config
|
new_config["cameras"][name] = camera_config
|
||||||
|
|
||||||
new_config["version"] = "0.16-0"
|
new_config["version"] = "0.16-0"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user