diff --git a/web/src/components/filter/SearchFilterGroup.tsx b/web/src/components/filter/SearchFilterGroup.tsx index b96ed7dd7..1426bb5f9 100644 --- a/web/src/components/filter/SearchFilterGroup.tsx +++ b/web/src/components/filter/SearchFilterGroup.tsx @@ -348,6 +348,26 @@ export function GeneralFilterContent({ onClose, }: GeneralFilterContentProps) { const { t } = useTranslation(["components/filter"]); + const { data: config } = useSWR("config", { + revalidateOnFocus: false, + }); + + const allAudioListenLabels = useMemo(() => { + if (!config) { + return []; + } + + const labels = new Set(); + Object.values(config.cameras).forEach((camera) => { + if (camera?.audio?.enabled) { + camera.audio.listen.forEach((label) => { + labels.add(label); + }); + } + }); + return [...labels].sort(); + }, [config]); + return ( <>
@@ -373,7 +393,10 @@ export function GeneralFilterContent({ {allLabels.map((item) => ( { if (isChecked) {