From 1238abedb17a6cde2e2afa3992d8564734804111 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Wed, 27 Mar 2024 10:02:33 -0700 Subject: [PATCH] hikvision: fix events crossing streams in camera channels --- plugins/hikvision/package-lock.json | 4 ++-- plugins/hikvision/package.json | 2 +- plugins/hikvision/src/main.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/hikvision/package-lock.json b/plugins/hikvision/package-lock.json index 2d3684ed68..e4690e682c 100644 --- a/plugins/hikvision/package-lock.json +++ b/plugins/hikvision/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/hikvision", - "version": "0.0.141", + "version": "0.0.142", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@scrypted/hikvision", - "version": "0.0.141", + "version": "0.0.142", "license": "Apache", "dependencies": { "@scrypted/common": "file:../../common", diff --git a/plugins/hikvision/package.json b/plugins/hikvision/package.json index 86f8b3cfb1..677691fc03 100644 --- a/plugins/hikvision/package.json +++ b/plugins/hikvision/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/hikvision", - "version": "0.0.141", + "version": "0.0.142", "description": "Hikvision Plugin for Scrypted", "author": "Scrypted", "license": "Apache", diff --git a/plugins/hikvision/src/main.ts b/plugins/hikvision/src/main.ts index 4ac246fe8b..eb9a45569d 100644 --- a/plugins/hikvision/src/main.ts +++ b/plugins/hikvision/src/main.ts @@ -110,7 +110,7 @@ class HikvisionCamera extends RtspSmartCamera implements Camera, Intercom, Reboo || event === HikvisionCameraEvent.RegionExit || event === HikvisionCameraEvent.FieldDetection) { - if (!checkCameraNumber(cameraNumber)) + if (!await checkCameraNumber(cameraNumber)) return; this.motionDetected = true; @@ -135,7 +135,7 @@ class HikvisionCamera extends RtspSmartCamera implements Camera, Intercom, Reboo const [channelId] = xml.EventNotificationAlert.channelID; - if (!checkCameraNumber(channelId)) { + if (!await checkCameraNumber(channelId)) { this.console.warn('chann fail') return; }