From d39e4e3ff1271e8cb806f60901bd7c54e0efb09a Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Sat, 22 Jun 2024 16:48:37 -0700 Subject: [PATCH] hikvision: fix channel id on old nvr --- plugins/hikvision/package-lock.json | 4 ++-- plugins/hikvision/package.json | 2 +- plugins/hikvision/src/main.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/hikvision/package-lock.json b/plugins/hikvision/package-lock.json index e43cfee962..c1d28a2f13 100644 --- a/plugins/hikvision/package-lock.json +++ b/plugins/hikvision/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/hikvision", - "version": "0.0.148", + "version": "0.0.149", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@scrypted/hikvision", - "version": "0.0.148", + "version": "0.0.149", "license": "Apache", "dependencies": { "@scrypted/common": "file:../../common", diff --git a/plugins/hikvision/package.json b/plugins/hikvision/package.json index df71a7d71b..5b5c335f18 100644 --- a/plugins/hikvision/package.json +++ b/plugins/hikvision/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/hikvision", - "version": "0.0.148", + "version": "0.0.149", "description": "Hikvision Plugin for Scrypted", "author": "Scrypted", "license": "Apache", diff --git a/plugins/hikvision/src/main.ts b/plugins/hikvision/src/main.ts index eb9a45569d..4667a93e5f 100644 --- a/plugins/hikvision/src/main.ts +++ b/plugins/hikvision/src/main.ts @@ -134,7 +134,7 @@ class HikvisionCamera extends RtspSmartCamera implements Camera, Intercom, Reboo const xml = await xml2js.parseStringPromise(data); - const [channelId] = xml.EventNotificationAlert.channelID; + const [channelId] = xml.EventNotificationAlert.channelID || xml.EventNotificationAlert.dynChannelID; if (!await checkCameraNumber(channelId)) { this.console.warn('chann fail') return;