forked from Github/frigate
Set max value for pre_capture (#8656)
This commit is contained in:
@@ -23,6 +23,7 @@ from frigate.const import (
|
||||
CACHE_SEGMENT_FORMAT,
|
||||
INSERT_MANY_RECORDINGS,
|
||||
MAX_SEGMENT_DURATION,
|
||||
MAX_SEGMENTS_IN_CACHE,
|
||||
RECORD_DIR,
|
||||
)
|
||||
from frigate.models import Event, Recordings
|
||||
@@ -121,8 +122,8 @@ class RecordingMaintainer(threading.Thread):
|
||||
}
|
||||
)
|
||||
|
||||
# delete all cached files past the most recent 5
|
||||
keep_count = 5
|
||||
# delete all cached files past the most recent MAX_SEGMENTS_IN_CACHE
|
||||
keep_count = MAX_SEGMENTS_IN_CACHE
|
||||
for camera in grouped_recordings.keys():
|
||||
# sort based on start time
|
||||
grouped_recordings[camera] = sorted(
|
||||
|
||||
Reference in New Issue
Block a user