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));
|
||||
}
|
||||
|
||||
// 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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user