From 1b880d0b7e8571e3fc27d347ed41dd6b0090c1c9 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Fri, 22 May 2026 08:50:16 -0500 Subject: [PATCH] republish motion and objects on in-memory detect resize A detect resolution change also invalidates the rasterized masks on motion and per-object filters. apply_section_update has rebuilt them at the new frame_shape; publish them too so other processes replace their old values. --- frigate/api/app.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/frigate/api/app.py b/frigate/api/app.py index cc5adc6f65..1e487598ac 100644 --- a/frigate/api/app.py +++ b/frigate/api/app.py @@ -750,6 +750,25 @@ def _config_set_in_memory(request: Request, body: AppConfigSetBody) -> JSONRespo settings, ) + # detect resize also republishes motion + objects so other + # processes pick up the rebuilt masks + if field == "detect": + cam_cfg = config.cameras.get(camera) + if cam_cfg is not None: + if cam_cfg.motion is not None: + request.app.config_publisher.publish_update( + CameraConfigUpdateTopic( + CameraConfigUpdateEnum.motion, camera + ), + cam_cfg.motion, + ) + request.app.config_publisher.publish_update( + CameraConfigUpdateTopic( + CameraConfigUpdateEnum.objects, camera + ), + cam_cfg.objects, + ) + return JSONResponse( content={"success": True, "message": "Config applied in-memory"}, status_code=200,