NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
Fix hardcoded camera name (#13520)
Nicolas Mowen58a471e46616
diff --git a/frigate/record/cleanup.py b/frigate/record/cleanup.pyindex 7703da8ea2..9ac7f7f914 100644--- a/frigate/record/cleanup.py+++ b/frigate/record/cleanup.py@@ -5,11 +5,9 @@ import itertoolsimport loggingimport osimport threading-from functools import reducefrom multiprocessing.synchronize import Event as MpEventfrom pathlib import Path-from peewee import operatorfrom playhouse.sqlite_ext import SqliteExtDatabasefrom frigate.config import CameraConfig, FrigateConfig, RetainModeEnum@@ -73,26 +71,17 @@ class RecordingCleanup(threading.Thread):).timestamp()expired_reviews: ReviewSegment = (ReviewSegment.select(ReviewSegment.id)- .where(ReviewSegment.camera == "front_cam")+ .where(ReviewSegment.camera == config.name).where(- reduce(- operator.or_,- [- reduce(- operator.and_,- [- (ReviewSegment.severity == "alert"),- (ReviewSegment.end_time < alert_expire_date),- ],- ),- reduce(- operator.and_,- [- (ReviewSegment.severity == "detection"),- (ReviewSegment.end_time < detection_expire_date),- ],- ),- ],+ (+ ReviewSegment.severity+ == "alert" & ReviewSegment.end_time+ < alert_expire_date+ )+ | (+ ReviewSegment.severity+ == "detection" & ReviewSegment.end_time+ < detection_expire_date)).namedtuples()