瀏覽代碼

Allow download of in progress clips

Jason Hunter 3 年之前
父節點
當前提交
340be7f86d
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      frigate/http.py

+ 4 - 1
frigate/http.py

@@ -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"