mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-01 11:07:41 +03:00
don't show audio labels if audio is not enabled
This commit is contained in:
parent
22827fd3c4
commit
15cbd2d75f
@ -20,12 +20,17 @@ function getReviewLabels(context: FormContext): string[] {
|
||||
trackLabels.forEach((label: string) => labels.add(label));
|
||||
}
|
||||
|
||||
// Audio labels from listen config (camera-level, falling back to global)
|
||||
// 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)
|
||||
// so that previously saved labels remain visible even if tracking config changed
|
||||
|
||||
Loading…
Reference in New Issue
Block a user