Improve recording timeline and VOD query performance (#23862)

* Improve recording timeline and VOD query performance

* Add recording query boundary tests
This commit is contained in:
DoFabien
2026-09-12 07:30:04 -06:00
committed by Nicolas Mowen
parent b2345cdd0b
commit 8fe8e20d68
3 changed files with 180 additions and 5 deletions
+2 -1
View File
@@ -25,7 +25,7 @@ from frigate.api.defs.query.recordings_query_parameters import (
)
from frigate.api.defs.response.generic_response import GenericResponse
from frigate.api.defs.tags import Tags
from frigate.const import RECORD_DIR
from frigate.const import MAX_SEGMENT_DURATION, RECORD_DIR
from frigate.models import Event, Recordings
from frigate.util.time import get_dst_transitions
@@ -243,6 +243,7 @@ async def recordings(
)
.where(
Recordings.camera == camera_name,
Recordings.start_time >= after - MAX_SEGMENT_DURATION,
Recordings.end_time >= after,
Recordings.start_time <= before,
)