Handle in progress previews export and fix time check bug (#14930)

* Handle in progress previews and fix time check bug

* Formatting
This commit is contained in:
Nicolas Mowen
2024-11-11 08:30:55 -07:00
committed by GitHub
parent 6c86827d3a
commit 9c20cd5f7b
4 changed files with 44 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ from frigate.record.export import (
PlaybackSourceEnum,
RecordingExporter,
)
from frigate.util.builtin import is_current_hour
logger = logging.getLogger(__name__)
@@ -86,7 +87,7 @@ def export_recording(
.count()
)
if previews_count <= 0:
if not is_current_hour(start_time) and previews_count <= 0:
return JSONResponse(
content=(
{"success": False, "message": "No previews found for time range"}