mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-05 11:31:13 +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:
|
def get_current_frame_time(self, camera: str) -> float:
|
||||||
"""Returns the latest frame time for a given camera."""
|
"""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
|
return self.camera_states[camera].current_frame_time
|
||||||
|
|
||||||
def set_sub_label(
|
def set_sub_label(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user