mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-08-22 13:47:29 +02:00
Fixes (#18319)
* Add Thai (still need to merge weblate) * Apply attribute logic to all label types * Fix area check --------- Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
This commit is contained in:
parent
afe513336c
commit
37d40558b7
@ -650,8 +650,9 @@ class TrackedObjectAttribute:
|
|||||||
best_object_id = obj["id"]
|
best_object_id = obj["id"]
|
||||||
best_object_label = obj["label"]
|
best_object_label = obj["label"]
|
||||||
else:
|
else:
|
||||||
if best_object_label == "car" and obj["label"] == "car":
|
if best_object_label == obj["label"]:
|
||||||
# if multiple cars are overlapping with the same label then the label will not be assigned
|
# if multiple objects of the same type are overlapping
|
||||||
|
# then the attribute will not be assigned
|
||||||
return None
|
return None
|
||||||
elif object_area < best_object_area:
|
elif object_area < best_object_area:
|
||||||
# if a car and person are overlapping then assign the label to the smaller object (which should be the person)
|
# if a car and person are overlapping then assign the label to the smaller object (which should be the person)
|
||||||
|
@ -162,6 +162,7 @@
|
|||||||
"da": "Dansk (Danish)",
|
"da": "Dansk (Danish)",
|
||||||
"sk": "Slovenčina (Slovak)",
|
"sk": "Slovenčina (Slovak)",
|
||||||
"yue": "粵語 (Cantonese)",
|
"yue": "粵語 (Cantonese)",
|
||||||
|
"th": "ไทย (Thai)",
|
||||||
"withSystem": {
|
"withSystem": {
|
||||||
"label": "Use the system settings for language"
|
"label": "Use the system settings for language"
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,7 @@ const localeMap: Record<string, () => Promise<Locale>> = {
|
|||||||
sk: () => import("date-fns/locale/sk").then((module) => module.sk),
|
sk: () => import("date-fns/locale/sk").then((module) => module.sk),
|
||||||
"yue-Hant": () =>
|
"yue-Hant": () =>
|
||||||
import("date-fns/locale/zh-HK").then((module) => module.zhHK),
|
import("date-fns/locale/zh-HK").then((module) => module.zhHK),
|
||||||
|
th: () => import("date-fns/locale/th").then((module) => module.th),
|
||||||
};
|
};
|
||||||
|
|
||||||
export function useDateLocale(): Locale {
|
export function useDateLocale(): Locale {
|
||||||
|
@ -8,6 +8,7 @@ export const supportedLanguageKeys = [
|
|||||||
"nb-NO",
|
"nb-NO",
|
||||||
"zh-CN",
|
"zh-CN",
|
||||||
"yue-Hant",
|
"yue-Hant",
|
||||||
|
"th",
|
||||||
"ru",
|
"ru",
|
||||||
"tr",
|
"tr",
|
||||||
"pl",
|
"pl",
|
||||||
|
@ -901,7 +901,9 @@ function FaceAttempt({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return imgRef.current.naturalWidth * imgRef.current.naturalHeight;
|
return imgRef.current.naturalWidth * imgRef.current.naturalHeight;
|
||||||
}, [imgRef]);
|
// only refresh when severity changes
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
|
}, [imgRef.current]);
|
||||||
|
|
||||||
// api calls
|
// api calls
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user