From 3f55acd6e0c62660651c4ad3926e7bb716c526ef Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Fri, 8 Mar 2024 16:03:52 -0700 Subject: [PATCH] Formatting --- frigate/output/preview.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/frigate/output/preview.py b/frigate/output/preview.py index 1f02f7107..43dd9bb03 100644 --- a/frigate/output/preview.py +++ b/frigate/output/preview.py @@ -201,17 +201,12 @@ class PreviewRecorder: frame_time: float, ) -> bool: """Decide if this frame should be added to PREVIEW.""" - active_objs = get_active_objects(frame_time, self.config, current_tracked_objects) - - preview_output_fps = ( - 2 - if any( - o["label"] == "car" - for o in active_objs - ) - else 1 + active_objs = get_active_objects( + frame_time, self.config, current_tracked_objects ) + preview_output_fps = 2 if any(o["label"] == "car" for o in active_objs) else 1 + # limit output to 1 fps if (frame_time - self.last_output_time) < 1 / preview_output_fps: return False