mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
prevent oldest recording from being deleted
This commit is contained in:
parent
05fc35fc3d
commit
b2e05afff2
@ -294,7 +294,8 @@ class RecordingCleanup(threading.Thread):
|
||||
Recordings.select().order_by(Recordings.start_time.desc()).get()
|
||||
)
|
||||
|
||||
oldest_timestamp = oldest_recording.start_time
|
||||
p = Path(oldest_recording.path)
|
||||
oldest_timestamp = p.stat().st_mtime - 1
|
||||
except DoesNotExist:
|
||||
oldest_timestamp = datetime.datetime.now().timestamp()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user