Skip to content

Commit

Permalink
Allow download of in progress clips
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterjm authored and blakeblackshear committed Feb 19, 2022
1 parent 0ff4acd commit 340be7f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frigate/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,10 @@ def event_clip(id):
clip_path = os.path.join(CLIPS_DIR, file_name)

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.headers["Content-Description"] = "File Transfer"
Expand Down

0 comments on commit 340be7f

Please sign in to comment.