Add back duration modification

This commit is contained in:
Nicolas Mowen 2025-05-14 16:18:13 -06:00
parent 222b8d161f
commit 0db871d7fd

View File

@ -670,7 +670,9 @@ def vod_ts(camera_name: str, start_ts: float, end_ts: float):
# adjust start offset if start_ts is after recording.start_time
if start_ts > recording.start_time:
clip["clipFrom"] = int((start_ts - recording.start_time) * 1000)
inpoint = int((start_ts - recording.start_time) * 1000)
clip["clipFrom"] = inpoint
duration -= inpoint
# adjust end if recording.end_time is after end_ts
if recording.end_time > end_ts: