mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-26 19:06:11 +01:00
ensure duration > 0 for segments
This commit is contained in:
parent
e0c0033852
commit
24e2f84231
@ -658,8 +658,12 @@ def vod_ts(camera, start_ts, end_ts):
|
|||||||
# Determine if we need to end the last clip early
|
# Determine if we need to end the last clip early
|
||||||
if recording.end_time > end_ts:
|
if recording.end_time > end_ts:
|
||||||
duration -= int((recording.end_time - end_ts) * 1000)
|
duration -= int((recording.end_time - end_ts) * 1000)
|
||||||
clips.append(clip)
|
|
||||||
durations.append(duration)
|
if duration > 0:
|
||||||
|
clips.append(clip)
|
||||||
|
durations.append(duration)
|
||||||
|
else:
|
||||||
|
logger.warning(f"Recording clip is missing or empty: {recording.path}")
|
||||||
|
|
||||||
if not clips:
|
if not clips:
|
||||||
return "No recordings found.", 404
|
return "No recordings found.", 404
|
||||||
|
Loading…
Reference in New Issue
Block a user