Skip to content

Add object detection, tracking, mobile notifications, and search to any security camera.

remove imgs at storage limit

roryclear0b64eb6f4008
diff --git a/clearcam.py b/clearcam.py
index 0ce29d0..609e2f5 100644
--- a/clearcam.py
+++ b/clearcam.py
@@ -790,6 +790,7 @@ class HLSRequestHandler(BaseHTTPRequestHandler):
recordings.sort(key=lambda x: x[1])
oldest_recording = recordings[0][0]
shutil.rmtree(oldest_recording)
+ shutil.rmtree(largest_cam / "event_images" / oldest_recording.name, ignore_errors=True)
print(f"Deleted oldest recording: {oldest_recording}")
except Exception as e: