mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-11-17 11:03:02 +03:00
guard get_current_frame_time against missing camera state
This commit is contained in:
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user