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:
@@ -1007,7 +1007,7 @@ class TrackedObjectProcessor(threading.Thread):
|
||||
|
||||
return True
|
||||
|
||||
def should_retain_recording(self, camera, obj: TrackedObject):
|
||||
def should_retain_recording(self, camera: str, obj: TrackedObject):
|
||||
if obj.false_positive:
|
||||
return False
|
||||
|
||||
@@ -1022,7 +1022,11 @@ class TrackedObjectProcessor(threading.Thread):
|
||||
return False
|
||||
|
||||
# If there are required zones and there is no overlap
|
||||
required_zones = record_config.events.required_zones
|
||||
review_config = self.config.cameras[camera].review
|
||||
required_zones = (
|
||||
review_config.alerts.required_zones
|
||||
+ review_config.detections.required_zones
|
||||
)
|
||||
if len(required_zones) > 0 and not set(obj.entered_zones) & set(required_zones):
|
||||
logger.debug(
|
||||
f"Not creating clip for {obj.obj_data['id']} because it did not enter required zones"
|
||||
|
||||
Reference in New Issue
Block a user