mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-02 00:52:17 +03:00
Fixes (#18833)
* Don't allow editing of sub label until object lifecycle has ended * Update sub labels in ended review segments When manually editing a sub label for a tracked object from the UI, any review segments containing that tracked object did not have their sub_labels and objects values altered * simplify * Additional onvif debug logs in get_camera_status * Ensure that best object is only set when the snapshot is actually updated. * Don't hide downlaod button when there is no review item --------- Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
This commit is contained in:
co-authored by
Nicolas Mowen
parent
8a9ebe9292
commit
cc368dd20f
+17
-9
@@ -291,11 +291,9 @@ class CameraState:
|
||||
new_obj.thumbnail_data = thumbnail_data
|
||||
tracked_objects[id].thumbnail_data = thumbnail_data
|
||||
object_type = new_obj.obj_data["label"]
|
||||
self.best_objects[object_type] = new_obj
|
||||
|
||||
# call event handlers
|
||||
for c in self.callbacks["snapshot"]:
|
||||
c(self.name, self.best_objects[object_type], frame_name)
|
||||
self.send_mqtt_snapshot(new_obj, object_type)
|
||||
|
||||
for c in self.callbacks["start"]:
|
||||
c(self.name, new_obj, frame_name)
|
||||
@@ -417,13 +415,9 @@ class CameraState:
|
||||
or (now - current_best.thumbnail_data["frame_time"])
|
||||
> self.camera_config.best_image_timeout
|
||||
):
|
||||
self.best_objects[object_type] = obj
|
||||
for c in self.callbacks["snapshot"]:
|
||||
c(self.name, self.best_objects[object_type], frame_name)
|
||||
self.send_mqtt_snapshot(obj, object_type)
|
||||
else:
|
||||
self.best_objects[object_type] = obj
|
||||
for c in self.callbacks["snapshot"]:
|
||||
c(self.name, self.best_objects[object_type], frame_name)
|
||||
self.send_mqtt_snapshot(obj, object_type)
|
||||
|
||||
for c in self.callbacks["camera_activity"]:
|
||||
c(self.name, camera_activity)
|
||||
@@ -472,6 +466,20 @@ class CameraState:
|
||||
|
||||
self.previous_frame_id = frame_name
|
||||
|
||||
def send_mqtt_snapshot(self, new_obj: TrackedObject, object_type: str) -> None:
|
||||
for c in self.callbacks["snapshot"]:
|
||||
updated = c(self.name, new_obj)
|
||||
|
||||
# if the snapshot was not updated, then this object is not a best object
|
||||
# but all new objects should be considered the next best object
|
||||
# so we remove the label from the best objects
|
||||
if updated:
|
||||
self.best_objects[object_type] = new_obj
|
||||
else:
|
||||
if object_type in self.best_objects:
|
||||
self.best_objects.pop(object_type)
|
||||
break
|
||||
|
||||
def save_manual_event_image(
|
||||
self,
|
||||
frame: np.ndarray | None,
|
||||
|
||||
Reference in New Issue
Block a user