mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-18 17:14:26 +03:00
tweaks
This commit is contained in:
parent
663ebccc3f
commit
050b2d4317
@ -340,7 +340,7 @@ objects:
|
||||
review:
|
||||
# Optional: alerts configuration
|
||||
alerts:
|
||||
# Optional: enables alerts for the camera (default: True)
|
||||
# Optional: enables alerts for the camera (default: shown below)
|
||||
enabled: True
|
||||
# Optional: labels that qualify as an alert (default: shown below)
|
||||
labels:
|
||||
@ -354,7 +354,7 @@ review:
|
||||
- driveway
|
||||
# Optional: detections configuration
|
||||
detections:
|
||||
# Optional: enables detections for the camera (default: True)
|
||||
# Optional: enables detections for the camera (default: shown below)
|
||||
enabled: True
|
||||
# Optional: labels that qualify as a detection (default: all labels that are tracked / listened to)
|
||||
labels:
|
||||
|
||||
@ -202,9 +202,7 @@ class EventProcessor(threading.Thread):
|
||||
Event.end_time: end_time,
|
||||
Event.zones: list(event_data["entered_zones"]),
|
||||
Event.thumbnail: event_data["thumbnail"],
|
||||
Event.has_clip: event_data["has_clip"]
|
||||
if event_data.get("max_severity")
|
||||
else False,
|
||||
Event.has_clip: event_data["has_clip"],
|
||||
Event.has_snapshot: event_data["has_snapshot"],
|
||||
Event.model_hash: first_detector.model.model_hash,
|
||||
Event.model_type: first_detector.model.model_type,
|
||||
|
||||
@ -459,38 +459,8 @@ class ReviewSegmentMaintainer(threading.Thread):
|
||||
|
||||
if updated_review_topic:
|
||||
camera_name = updated_review_topic.rpartition("/")[-1]
|
||||
old_alerts_enabled = self.config.cameras[
|
||||
camera_name
|
||||
].review.alerts.enabled
|
||||
old_detections_enabled = self.config.cameras[
|
||||
camera_name
|
||||
].review.detections.enabled
|
||||
self.config.cameras[camera_name].review = updated_review_config
|
||||
|
||||
# Check if alerts.enabled or detections.enabled has changed
|
||||
if (
|
||||
old_alerts_enabled
|
||||
!= self.config.cameras[camera_name].review.alerts.enabled
|
||||
or old_detections_enabled
|
||||
!= self.config.cameras[camera_name].review.detections.enabled
|
||||
):
|
||||
segment = self.active_review_segments.get(camera_name)
|
||||
if segment:
|
||||
if (
|
||||
not self.config.cameras[
|
||||
camera_name
|
||||
].review.alerts.enabled
|
||||
and segment.severity == SeverityEnum.alert
|
||||
):
|
||||
self.end_segment(camera_name)
|
||||
elif (
|
||||
not self.config.cameras[
|
||||
camera_name
|
||||
].review.detections.enabled
|
||||
and segment.severity == SeverityEnum.detection
|
||||
):
|
||||
self.end_segment(camera_name)
|
||||
|
||||
(topic, data) = self.detection_subscriber.check_for_update(timeout=1)
|
||||
|
||||
if not topic:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user