mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-08-04 13:47:37 +02:00
use ceil instead of round for recording snapshot (#17444)
This commit is contained in:
parent
37c3ac5413
commit
bda7fcc784
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import glob
|
import glob
|
||||||
import logging
|
import logging
|
||||||
|
import math
|
||||||
import os
|
import os
|
||||||
import subprocess as sp
|
import subprocess as sp
|
||||||
import time
|
import time
|
||||||
@ -262,7 +263,7 @@ def get_snapshot_from_recording(
|
|||||||
except DoesNotExist:
|
except DoesNotExist:
|
||||||
# try again with a rounded frame time as it may be between
|
# try again with a rounded frame time as it may be between
|
||||||
# the rounded segment start time
|
# the rounded segment start time
|
||||||
frame_time = round(frame_time)
|
frame_time = math.ceil(frame_time)
|
||||||
try:
|
try:
|
||||||
recording = (
|
recording = (
|
||||||
Recordings.select(
|
Recordings.select(
|
||||||
|
Loading…
Reference in New Issue
Block a user