mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-08 20:25:26 +03:00
Fix end_ts logic
This commit is contained in:
parent
6eddba44ec
commit
4fa61f1a0f
@ -603,7 +603,9 @@ def event_preview(id: str, max_cache_age=2592000):
|
|||||||
)
|
)
|
||||||
|
|
||||||
start_ts = event.start_time
|
start_ts = event.start_time
|
||||||
end_ts = min(event.end_time - event.start_time, 20) if event.end_time else 20
|
end_ts = (
|
||||||
|
start_ts + min(event.end_time - event.start_time, 20) if event.end_time else 20
|
||||||
|
)
|
||||||
|
|
||||||
if datetime.fromtimestamp(event.start_time) < datetime.now().replace(
|
if datetime.fromtimestamp(event.start_time) < datetime.now().replace(
|
||||||
minute=0, second=0
|
minute=0, second=0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user