mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-14 07:05:24 +03:00
Minor formatting and readability cleanup
This commit is contained in:
parent
9be1eec5fd
commit
78a0a140f0
@ -832,7 +832,7 @@ class CameraState:
|
|||||||
for c in self.callbacks["object_status"]:
|
for c in self.callbacks["object_status"]:
|
||||||
c(self.name, "all", total_label_count)
|
c(self.name, "all", total_label_count)
|
||||||
|
|
||||||
# publish activel label counts for this camera
|
# publish active label counts for this camera
|
||||||
if total_active_label_count != self.active_object_counts.get("all"):
|
if total_active_label_count != self.active_object_counts.get("all"):
|
||||||
self.active_object_counts["all"] = total_active_label_count
|
self.active_object_counts["all"] = total_active_label_count
|
||||||
for c in self.callbacks["active_object_status"]:
|
for c in self.callbacks["active_object_status"]:
|
||||||
@ -1239,7 +1239,11 @@ class TrackedObjectProcessor(threading.Thread):
|
|||||||
active_obj_counter = Counter(
|
active_obj_counter = Counter(
|
||||||
obj.obj_data["label"]
|
obj.obj_data["label"]
|
||||||
for obj in camera_state.tracked_objects.values()
|
for obj in camera_state.tracked_objects.values()
|
||||||
if zone in obj.current_zones and not obj.false_positive and obj.active
|
if (
|
||||||
|
zone in obj.current_zones
|
||||||
|
and not obj.false_positive
|
||||||
|
and obj.active
|
||||||
|
)
|
||||||
)
|
)
|
||||||
total_label_count = 0
|
total_label_count = 0
|
||||||
total_active_label_count = 0
|
total_active_label_count = 0
|
||||||
@ -1285,7 +1289,6 @@ class TrackedObjectProcessor(threading.Thread):
|
|||||||
else:
|
else:
|
||||||
if label in obj_counter:
|
if label in obj_counter:
|
||||||
zone_label[camera] = obj_counter[label]
|
zone_label[camera] = obj_counter[label]
|
||||||
# Since this is a new combo, it is by definition active and will be present
|
|
||||||
active_zone_label[camera] = active_obj_counter[label]
|
active_zone_label[camera] = active_obj_counter[label]
|
||||||
self.dispatcher.publish(
|
self.dispatcher.publish(
|
||||||
f"{zone}/{label}",
|
f"{zone}/{label}",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user