From 689af4ff872bfc3b335a61e9da2d4348d4c7c553 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Sun, 5 Dec 2021 11:06:11 -0600 Subject: [PATCH] sync recordings with disk once on startup --- frigate/record.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frigate/record.py b/frigate/record.py index 3a9ac6520..f20dfb5dc 100644 --- a/frigate/record.py +++ b/frigate/record.py @@ -443,6 +443,9 @@ class RecordingCleanup(threading.Thread): logger.debug("End sync recordings.") def run(self): + # on startup sync recordings with disk + self.sync_recordings() + # Expire tmp clips every minute, recordings and clean directories every hour. for counter in itertools.cycle(range(60)): if self.stop_event.wait(60): @@ -454,4 +457,3 @@ class RecordingCleanup(threading.Thread): self.expire_recordings() self.expire_files() remove_empty_directories(RECORD_DIR) - self.sync_recordings()