Update camera detection dimensions based on stream information if available

This commit is contained in:
Sergey Krashevich 2023-06-26 06:45:28 +03:00
parent 2682aa9989
commit 59e7ec1bdc
No known key found for this signature in database
GPG Key ID: 625171324E7D3856

View File

@ -970,12 +970,12 @@ class FrigateConfig(FrigateBaseModel):
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"]
)