mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-06-21 03:41:55 +03:00
add config migrator to remove date_style and time_style
This commit is contained in:
parent
e9d966db2a
commit
6a5031f1ec
@ -618,6 +618,16 @@ def migrate_018_0(config: dict[str, dict[str, Any]]) -> dict[str, dict[str, Any]
|
||||
|
||||
new_config["cameras"][name] = camera_config
|
||||
|
||||
# Remove deprecated date_style and time_style from global ui config
|
||||
global_ui = new_config.get("ui", {})
|
||||
if global_ui.get("date_style") is not None:
|
||||
del new_config["ui"]["date_style"]
|
||||
if global_ui.get("time_style") is not None:
|
||||
del new_config["ui"]["time_style"]
|
||||
# Remove ui section if empty
|
||||
if "ui" in new_config and not new_config["ui"]:
|
||||
del new_config["ui"]
|
||||
|
||||
new_config["version"] = "0.18-0"
|
||||
return new_config
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user