This commit is contained in:
Josh Hawkins 2026-05-06 00:45:07 +00:00 committed by GitHub
commit 55821e547b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 3 deletions

View File

@ -351,9 +351,11 @@ class RecordingCleanup(threading.Thread):
) )
.where( .where(
ReviewSegment.camera == camera, ReviewSegment.camera == camera,
# need to ensure segments for all reviews starting # candidate recordings can extend up to continuous_expire_date
# before the expire date are included # (the no-motion no-audio branch of the recordings query),
ReviewSegment.start_time < motion_expire_date, # so reviews must cover that full range to avoid deleting
# segments that overlap recent alerts/detections.
ReviewSegment.start_time < continuous_expire_date,
) )
.order_by(ReviewSegment.start_time) .order_by(ReviewSegment.start_time)
.namedtuples() .namedtuples()

View File

@ -1136,6 +1136,12 @@ function MotionReview({
); );
const [isRegionFilterOpen, setIsRegionFilterOpen] = useState(false); const [isRegionFilterOpen, setIsRegionFilterOpen] = useState(false);
// reset filter when camera changes
useEffect(() => {
setMotionFilterCells(new Set());
setPendingFilterCells(new Set());
}, [motionPreviewsCamera]);
const objectReviewItems = useMemo( const objectReviewItems = useMemo(
() => () =>
(overlapReviewSegments ?? []).filter( (overlapReviewSegments ?? []).filter(