pick the earliest overlapping preview for preview gif and mp4

This commit is contained in:
Josh Hawkins
2026-11-01 08:29:14 -06:00
parent fac65fdca2
commit 72c97f2b7d
+2
View File
@@ -1521,6 +1521,7 @@ async def preview_gif(
| ((start_ts > Previews.start_time) & (end_ts < Previews.end_time))
)
.where(Previews.camera == camera_name)
.order_by(Previews.start_time.asc())
.limit(1)
.get()
)
@@ -1710,6 +1711,7 @@ async def preview_mp4(
| ((start_ts > Previews.start_time) & (end_ts < Previews.end_time))
)
.where(Previews.camera == camera_name)
.order_by(Previews.start_time.asc())
.limit(1)
.get()
)