node-red-contrib-unifi-ultimate 1.1.21 → 1.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -30,7 +30,12 @@ function extractLicensePlates(event) {
|
|
|
30
30
|
thumbnails.forEach((thumbnail) => {
|
|
31
31
|
if (!thumbnail || typeof thumbnail !== "object") return;
|
|
32
32
|
if (thumbnail.type === "licensePlate" || (thumbnail.type === "vehicle" && hasPlateType)) {
|
|
33
|
-
|
|
33
|
+
// `name` is the OCR of a single frame and is often truncated or
|
|
34
|
+
// misread ("4II0"); `matchedName` is the plate Protect settles on
|
|
35
|
+
// across the whole track and shows in its own UI.
|
|
36
|
+
const attributes = thumbnail.attributes && typeof thumbnail.attributes === "object" ? thumbnail.attributes : {};
|
|
37
|
+
const matchedName = typeof attributes.matchedName === "string" ? attributes.matchedName.trim() : "";
|
|
38
|
+
addPlate(matchedName || thumbnail.name);
|
|
34
39
|
}
|
|
35
40
|
});
|
|
36
41
|
return Array.from(plates.values());
|
package/package.json
CHANGED