mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-03 13:54:55 +03:00
don't show audio labels if audio is not enabled
This commit is contained in:
parent
22827fd3c4
commit
15cbd2d75f
@ -20,11 +20,16 @@ function getReviewLabels(context: FormContext): string[] {
|
|||||||
trackLabels.forEach((label: string) => labels.add(label));
|
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 audioLabels =
|
const audioEnabled =
|
||||||
fullCameraConfig?.audio?.listen ?? fullConfig?.audio?.listen;
|
fullCameraConfig?.audio?.enabled_in_config ??
|
||||||
if (Array.isArray(audioLabels)) {
|
fullConfig?.audio?.enabled_in_config;
|
||||||
audioLabels.forEach((label: string) => labels.add(label));
|
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)
|
// Include any labels already in the review form data (alerts + detections)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user