mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
oops
This commit is contained in:
parent
810c23d8ee
commit
bd77b74689
@ -413,13 +413,13 @@ class TrackedObjectProcessor(threading.Thread):
|
|||||||
self.client.publish(f"{self.topic_prefix}/events", json.dumps(message), retain=False)
|
self.client.publish(f"{self.topic_prefix}/events", json.dumps(message), retain=False)
|
||||||
|
|
||||||
def end(camera, obj: TrackedObject, current_frame_time):
|
def end(camera, obj: TrackedObject, current_frame_time):
|
||||||
|
if not obj.false_positive:
|
||||||
message = { 'before': obj.previous, 'after': obj.to_dict() }
|
message = { 'before': obj.previous, 'after': obj.to_dict() }
|
||||||
self.client.publish(f"{self.topic_prefix}/events", json.dumps(message), retain=False)
|
self.client.publish(f"{self.topic_prefix}/events", json.dumps(message), retain=False)
|
||||||
if self.config.cameras[camera].save_clips.enabled and not obj.false_positive:
|
if self.config.cameras[camera].save_clips.enabled and not obj.false_positive:
|
||||||
thumbnail_file_name = f"{camera}-{obj.obj_data['id']}.jpg"
|
thumbnail_file_name = f"{camera}-{obj.obj_data['id']}.jpg"
|
||||||
with open(os.path.join(self.config.save_clips.clips_dir, thumbnail_file_name), 'wb') as f:
|
with open(os.path.join(self.config.save_clips.clips_dir, thumbnail_file_name), 'wb') as f:
|
||||||
f.write(obj.get_jpg_bytes())
|
f.write(obj.get_jpg_bytes())
|
||||||
if not obj.false_positive:
|
|
||||||
self.event_queue.put(('end', camera, obj.to_dict(include_thumbnail=True)))
|
self.event_queue.put(('end', camera, obj.to_dict(include_thumbnail=True)))
|
||||||
|
|
||||||
def snapshot(camera, obj: TrackedObject, current_frame_time):
|
def snapshot(camera, obj: TrackedObject, current_frame_time):
|
||||||
|
Loading…
Reference in New Issue
Block a user