forked from Github/frigate
Implement config migration and restructure config for new review format (#10961)
* Update reference config to reflect new config * Migrate 0.13 config to match 0.14 config style * Overwrite existing config * Adjust config schema to remove events required zones and include reviews * Update object config to check correct required zones config * Refactor reviews to remove motion and only create review segments in expected circumstances * Cleanup * Formatting * Fix update ordering * Update pydantic * Remove rtmp references as part of migration * Catch file not found for alert frame
This commit is contained in:
@@ -63,6 +63,7 @@ from frigate.storage import StorageMaintainer
|
||||
from frigate.timeline import TimelineProcessor
|
||||
from frigate.types import CameraMetricsTypes, PTZMetricsTypes
|
||||
from frigate.util.builtin import save_default_config
|
||||
from frigate.util.config import migrate_frigate_config
|
||||
from frigate.util.object import get_camera_regions_grid
|
||||
from frigate.version import VERSION
|
||||
from frigate.video import capture_camera, track_camera
|
||||
@@ -126,6 +127,9 @@ class FrigateApp:
|
||||
config_file = config_file_yaml
|
||||
save_default_config(config_file)
|
||||
|
||||
# check if the config file needs to be migrated
|
||||
migrate_frigate_config(config_file)
|
||||
|
||||
user_config = FrigateConfig.parse_file(config_file)
|
||||
self.config = user_config.runtime_config(self.plus_api)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user