From 59e7ec1bdca87f802cc2645826ac1a1797311908 Mon Sep 17 00:00:00 2001 From: Sergey Krashevich Date: Mon, 26 Jun 2023 06:45:28 +0300 Subject: [PATCH] Update camera detection dimensions based on stream information if available --- frigate/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frigate/config.py b/frigate/config.py index 94c7d1f364..c35f79952d 100644 --- a/frigate/config.py +++ b/frigate/config.py @@ -970,12 +970,12 @@ def runtime_config(self, plus_api: PlusApi = None) -> FrigateConfig: camera_config.detect.width = ( stream_info["width"] - if stream_info["width"] > 0 + if stream_info.get("width") else DEFAULT_DETECT_DIMENSIONS["width"] ) camera_config.detect.height = ( stream_info["height"] - if stream_info["height"] > 0 + if stream_info.get("height") else DEFAULT_DETECT_DIMENSIONS["height"] )