mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-11 01:02:48 +03:00
Refactor detector and model management (#23995)
* Refactor detector and model management * Fix model resolution field
This commit is contained in:
committed by
Josh Hawkins
parent
13a7d8ecae
commit
591464e82f
@@ -13,6 +13,7 @@ import { cn } from "@/lib/utils";
|
||||
import { TooltipPortal } from "@radix-ui/react-tooltip";
|
||||
import useContextMenu from "@/hooks/use-contextmenu";
|
||||
import { getTranslatedLabel } from "@/utils/i18n";
|
||||
import { isAttributeOfLabel } from "@/utils/modelUtil";
|
||||
|
||||
type SearchThumbnailProps = {
|
||||
searchResult: SearchResult;
|
||||
@@ -58,9 +59,7 @@ export default function SearchThumbnail({
|
||||
}
|
||||
|
||||
if (
|
||||
config.model.attributes_map[searchResult.label]?.includes(
|
||||
searchResult.sub_label,
|
||||
)
|
||||
isAttributeOfLabel(config, searchResult.label, searchResult.sub_label)
|
||||
) {
|
||||
return searchResult.sub_label;
|
||||
}
|
||||
@@ -82,9 +81,7 @@ export default function SearchThumbnail({
|
||||
}
|
||||
|
||||
if (
|
||||
config.model.attributes_map[searchResult.label]?.includes(
|
||||
searchResult.sub_label,
|
||||
)
|
||||
isAttributeOfLabel(config, searchResult.label, searchResult.sub_label)
|
||||
) {
|
||||
return "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user