mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 02:35:22 +03:00
Formatting
This commit is contained in:
parent
c6b0ec6389
commit
0245937963
@ -657,7 +657,9 @@ class TrackedObjectProcessor(threading.Thread):
|
|||||||
self.last_motion_detected: dict[str, float] = {}
|
self.last_motion_detected: dict[str, float] = {}
|
||||||
|
|
||||||
def start(camera, obj: TrackedObject, current_frame_time):
|
def start(camera, obj: TrackedObject, current_frame_time):
|
||||||
self.event_queue.put((DetectionTypeEnum.tracked_object, "start", camera, obj.to_dict()))
|
self.event_queue.put(
|
||||||
|
(DetectionTypeEnum.tracked_object, "start", camera, obj.to_dict())
|
||||||
|
)
|
||||||
|
|
||||||
def update(camera, obj: TrackedObject, current_frame_time):
|
def update(camera, obj: TrackedObject, current_frame_time):
|
||||||
obj.has_snapshot = self.should_save_snapshot(camera, obj)
|
obj.has_snapshot = self.should_save_snapshot(camera, obj)
|
||||||
@ -671,7 +673,12 @@ class TrackedObjectProcessor(threading.Thread):
|
|||||||
self.dispatcher.publish("events", json.dumps(message), retain=False)
|
self.dispatcher.publish("events", json.dumps(message), retain=False)
|
||||||
obj.previous = after
|
obj.previous = after
|
||||||
self.event_queue.put(
|
self.event_queue.put(
|
||||||
(DetectionTypeEnum.tracked_object, "update", camera, obj.to_dict(include_thumbnail=True))
|
(
|
||||||
|
DetectionTypeEnum.tracked_object,
|
||||||
|
"update",
|
||||||
|
camera,
|
||||||
|
obj.to_dict(include_thumbnail=True),
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
def end(camera, obj: TrackedObject, current_frame_time):
|
def end(camera, obj: TrackedObject, current_frame_time):
|
||||||
@ -723,7 +730,14 @@ class TrackedObjectProcessor(threading.Thread):
|
|||||||
}
|
}
|
||||||
self.dispatcher.publish("events", json.dumps(message), retain=False)
|
self.dispatcher.publish("events", json.dumps(message), retain=False)
|
||||||
|
|
||||||
self.event_queue.put((DetectionTypeEnum.tracked_object, "end", camera, obj.to_dict(include_thumbnail=True)))
|
self.event_queue.put(
|
||||||
|
(
|
||||||
|
DetectionTypeEnum.tracked_object,
|
||||||
|
"end",
|
||||||
|
camera,
|
||||||
|
obj.to_dict(include_thumbnail=True),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
def snapshot(camera, obj: TrackedObject, current_frame_time):
|
def snapshot(camera, obj: TrackedObject, current_frame_time):
|
||||||
mqtt_config: MqttConfig = self.config.cameras[camera].mqtt
|
mqtt_config: MqttConfig = self.config.cameras[camera].mqtt
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user