forked from Github/frigate
allow the best image timeout to be configurable
This commit is contained in:
@@ -193,8 +193,8 @@ class CameraState():
|
||||
current_best = self.best_objects[object_type]
|
||||
now = datetime.datetime.now().timestamp()
|
||||
# if the object is a higher score than the current best score
|
||||
# or the current object is more than 1 minute old, use the new object
|
||||
if obj_copy['score'] > current_best['score'] or (now - current_best['frame_time']) > 60:
|
||||
# or the current object is older than desired, use the new object
|
||||
if obj_copy['score'] > current_best['score'] or (now - current_best['frame_time']) > self.config.get('best_image_timeout', 60):
|
||||
obj_copy['frame'] = np.copy(self.current_frame)
|
||||
self.best_objects[object_type] = obj_copy
|
||||
for c in self.callbacks['snapshot']:
|
||||
|
||||
Reference in New Issue
Block a user