mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-11 05:35:25 +03:00
Cleanup
This commit is contained in:
parent
76d7e29640
commit
476e727f5d
@ -407,17 +407,17 @@ class ReviewSegmentMaintainer(threading.Thread):
|
|||||||
severity = None
|
severity = None
|
||||||
|
|
||||||
camera_config = self.config.cameras[camera]
|
camera_config = self.config.cameras[camera]
|
||||||
detections = []
|
detections = set()
|
||||||
|
|
||||||
for audio in audio_detections:
|
for audio in audio_detections:
|
||||||
if audio in camera_config.review.alerts.labels:
|
if audio in camera_config.review.alerts.labels:
|
||||||
detections.append(audio)
|
detections.add(audio)
|
||||||
severity = SeverityEnum.alert
|
severity = SeverityEnum.alert
|
||||||
elif (
|
elif (
|
||||||
not camera_config.review.detections.labels
|
not camera_config.review.detections.labels
|
||||||
or audio in camera_config.review.detections.labels
|
or audio in camera_config.review.detections.labels
|
||||||
):
|
):
|
||||||
detections.append(audio_detections)
|
detections.add(audio)
|
||||||
|
|
||||||
if not severity:
|
if not severity:
|
||||||
severity = SeverityEnum.detection
|
severity = SeverityEnum.detection
|
||||||
@ -429,8 +429,7 @@ class ReviewSegmentMaintainer(threading.Thread):
|
|||||||
severity,
|
severity,
|
||||||
{},
|
{},
|
||||||
set(),
|
set(),
|
||||||
set(detections),
|
detections,
|
||||||
[],
|
|
||||||
)
|
)
|
||||||
elif topic == DetectionTypeEnum.api:
|
elif topic == DetectionTypeEnum.api:
|
||||||
self.active_review_segments[camera] = PendingReviewSegment(
|
self.active_review_segments[camera] = PendingReviewSegment(
|
||||||
@ -440,7 +439,6 @@ class ReviewSegmentMaintainer(threading.Thread):
|
|||||||
{manual_info["event_id"]: manual_info["label"]},
|
{manual_info["event_id"]: manual_info["label"]},
|
||||||
set(),
|
set(),
|
||||||
set(),
|
set(),
|
||||||
[],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if manual_info["state"] == ManualEventState.start:
|
if manual_info["state"] == ManualEventState.start:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user