Don't show sub labels in main label filter list (#16168)

This commit is contained in:
Nicolas Mowen 2025-01-27 07:07:49 -07:00 committed by GitHub
parent 5943fc1895
commit 99d27c154e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 1 deletions

View File

@ -153,6 +153,7 @@ def config(request: Request):
config["plus"] = {"enabled": request.app.frigate_config.plus_api.is_active()}
config["model"]["colormap"] = config_obj.model.colormap
config["model"]["all_attributes"] = config_obj.model.all_attributes
# use merged labelamp
for detector_config in config["detectors"].values():

View File

@ -61,7 +61,9 @@ export default function SearchFilterGroup({
}
const cameraConfig = config.cameras[camera];
cameraConfig.objects.track.forEach((label) => {
labels.add(label);
if (!config.model.all_attributes.includes(label)) {
labels.add(label);
}
});
if (cameraConfig.audio.enabled_in_config) {

View File

@ -343,6 +343,7 @@ export interface FrigateConfig {
width: number;
colormap: { [key: string]: [number, number, number] };
attributes_map: { [key: string]: [string] };
all_attributes: [string];
};
motion: Record<string, unknown> | null;