Match preview frames to exact camera (#25067)

* match preview frames to the exact camera

Current-hour preview frames were selected with a "preview_{camera}-" prefix match, so a camera whose name extends another with "-" (front and front-door, cam and cam-2) had its frames included in the other camera's frame listing, preview GIF and MP4, and preview export. The frames listing, the GIF and MP4 routes, and the preview export now filter with is_camera_preview_frame.

* start preview frame tests ahead of now
This commit is contained in:
Josh Hawkins
2026-11-24 06:22:34 -07:00
committed by GitHub
parent 764ab2c4f0
commit 952ff4a076
5 changed files with 144 additions and 5 deletions
+1 -1
View File
@@ -1333,7 +1333,7 @@ class RecordingExporter(threading.Thread):
end_file = f"{file_start}{self.end_time}.{PREVIEW_FRAME_TYPE}"
for file in sorted(os.listdir(preview_dir)):
if not file.startswith(file_start):
if not is_camera_preview_frame(file, self.camera):
continue
if file < start_file: