Allow download of in progress clips

This commit is contained in:
Jason Hunter 2022-02-09 16:41:38 -05:00
parent 62c1a61ed0
commit 5c4329b7f7

View File

@ -249,7 +249,10 @@ def event_clip(id):
clip_path = os.path.join(CLIPS_DIR, file_name) clip_path = os.path.join(CLIPS_DIR, file_name)
if not os.path.isfile(clip_path): if not os.path.isfile(clip_path):
return recording_clip(event.camera, event.start_time, event.end_time) end_ts = (
datetime.now().timestamp() if event.end_time is None else event.end_time
)
return recording_clip(event.camera, event.start_time, end_ts)
response = make_response() response = make_response()
response.headers["Content-Description"] = "File Transfer" response.headers["Content-Description"] = "File Transfer"