Skip to content

Commit

Permalink
Don't show sub labels in main label filter list (blakeblackshear#16168)
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 authored Jan 27, 2025
1 parent 5943fc1 commit 99d27c1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions frigate/api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
4 changes: 3 additions & 1 deletion web/src/components/filter/SearchFilterGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions web/src/types/frigateConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 99d27c1

Please sign in to comment.