mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-04 04:27:42 +03:00
Fix incorrectly copying zones
This commit is contained in:
parent
309638323a
commit
58b2ad9c8f
@ -1,5 +1,6 @@
|
|||||||
"""Maintain review segments in db."""
|
"""Maintain review segments in db."""
|
||||||
|
|
||||||
|
import copy
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
@ -119,21 +120,23 @@ class PendingReviewSegment:
|
|||||||
)
|
)
|
||||||
|
|
||||||
def get_data(self, ended: bool) -> dict:
|
def get_data(self, ended: bool) -> dict:
|
||||||
return {
|
return copy.deepcopy(
|
||||||
ReviewSegment.id.name: self.id,
|
{
|
||||||
ReviewSegment.camera.name: self.camera,
|
ReviewSegment.id.name: self.id,
|
||||||
ReviewSegment.start_time.name: self.start_time,
|
ReviewSegment.camera.name: self.camera,
|
||||||
ReviewSegment.end_time.name: self.last_update if ended else None,
|
ReviewSegment.start_time.name: self.start_time,
|
||||||
ReviewSegment.severity.name: self.severity.value,
|
ReviewSegment.end_time.name: self.last_update if ended else None,
|
||||||
ReviewSegment.thumb_path.name: self.frame_path,
|
ReviewSegment.severity.name: self.severity.value,
|
||||||
ReviewSegment.data.name: {
|
ReviewSegment.thumb_path.name: self.frame_path,
|
||||||
"detections": list(set(self.detections.keys())),
|
ReviewSegment.data.name: {
|
||||||
"objects": list(set(self.detections.values())),
|
"detections": list(set(self.detections.keys())),
|
||||||
"sub_labels": list(self.sub_labels.values()),
|
"objects": list(set(self.detections.values())),
|
||||||
"zones": self.zones,
|
"sub_labels": list(self.sub_labels.values()),
|
||||||
"audio": list(self.audio),
|
"zones": self.zones,
|
||||||
},
|
"audio": list(self.audio),
|
||||||
}.copy()
|
},
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class ReviewSegmentMaintainer(threading.Thread):
|
class ReviewSegmentMaintainer(threading.Thread):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user