瀏覽代碼

don't save thumbnails for false positives

Blake Blackshear 4 年之前
父節點
當前提交
7015eb66f2
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      frigate/object_processing.py

+ 1 - 1
frigate/object_processing.py

@@ -404,7 +404,7 @@ class TrackedObjectProcessor(threading.Thread):
 
 
         def end(camera, obj: TrackedObject):
         def end(camera, obj: TrackedObject):
             self.client.publish(f"{self.topic_prefix}/{camera}/events/end", json.dumps(obj.to_dict()), retain=False)
             self.client.publish(f"{self.topic_prefix}/{camera}/events/end", json.dumps(obj.to_dict()), retain=False)
-            if self.config.cameras[camera].save_clips.enabled:
+            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.snapshot_jpg)
                     f.write(obj.snapshot_jpg)