mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-06-21 03:41:55 +03:00
guard get_current_frame_time against missing camera state
This commit is contained in:
parent
2309628736
commit
293012fce2
@ -357,6 +357,9 @@ class TrackedObjectProcessor(threading.Thread):
|
||||
|
||||
def get_current_frame_time(self, camera: str) -> float:
|
||||
"""Returns the latest frame time for a given camera."""
|
||||
if camera not in self.camera_states:
|
||||
return 0.0
|
||||
|
||||
return self.camera_states[camera].current_frame_time
|
||||
|
||||
def set_sub_label(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user