From 15cbd2d75f58778d6fee92b0ad80d14f82c2bf6a Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Fri, 27 Mar 2026 09:18:14 -0500 Subject: [PATCH] don't show audio labels if audio is not enabled --- .../theme/widgets/ReviewLabelSwitchesWidget.tsx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/web/src/components/config-form/theme/widgets/ReviewLabelSwitchesWidget.tsx b/web/src/components/config-form/theme/widgets/ReviewLabelSwitchesWidget.tsx index c19eaaf9d..66ec79bc2 100644 --- a/web/src/components/config-form/theme/widgets/ReviewLabelSwitchesWidget.tsx +++ b/web/src/components/config-form/theme/widgets/ReviewLabelSwitchesWidget.tsx @@ -20,11 +20,16 @@ function getReviewLabels(context: FormContext): string[] { trackLabels.forEach((label: string) => labels.add(label)); } - // Audio labels from listen config (camera-level, falling back to global) - const audioLabels = - fullCameraConfig?.audio?.listen ?? fullConfig?.audio?.listen; - if (Array.isArray(audioLabels)) { - audioLabels.forEach((label: string) => labels.add(label)); + // Audio labels from listen config, only if audio detection is enabled + const audioEnabled = + fullCameraConfig?.audio?.enabled_in_config ?? + fullConfig?.audio?.enabled_in_config; + if (audioEnabled) { + const audioLabels = + fullCameraConfig?.audio?.listen ?? fullConfig?.audio?.listen; + if (Array.isArray(audioLabels)) { + audioLabels.forEach((label: string) => labels.add(label)); + } } // Include any labels already in the review form data (alerts + detections)