From 0cb70778dbdbdaecde9e80cba38e9782c0022dd9 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Sun, 30 Oct 2022 09:58:41 -0700 Subject: [PATCH] hikvision: fix camera number detection when more than 10 cameras --- 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 8bf913d62..fe9461ec0 100644 --- a/plugins/hikvision/package-lock.json +++ b/plugins/hikvision/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/hikvision", - "version": "0.0.108", + "version": "0.0.109", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@scrypted/hikvision", - "version": "0.0.108", + "version": "0.0.109", "license": "Apache", "dependencies": { "@koush/axios-digest-auth": "^0.8.5", diff --git a/plugins/hikvision/package.json b/plugins/hikvision/package.json index deb67d280..926ef6e8e 100644 --- a/plugins/hikvision/package.json +++ b/plugins/hikvision/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/hikvision", - "version": "0.0.108", + "version": "0.0.109", "description": "HikVision Plugin for Scrypted", "author": "Scrypted", "license": "Apache", diff --git a/plugins/hikvision/src/main.ts b/plugins/hikvision/src/main.ts index 0d83c0997..910bdc66d 100644 --- a/plugins/hikvision/src/main.ts +++ b/plugins/hikvision/src/main.ts @@ -231,7 +231,7 @@ class HikVisionCamera extends RtspSmartCamera implements Camera, Intercom { let index = 0; const cameraNumber = this.getCameraNumber(); for (const [id, channel] of detectedChannels.entries()) { - if (cameraNumber && !id.startsWith(cameraNumber)) + if (cameraNumber && id !== cameraNumber) continue; const mso = this.createRtspMediaStreamOptions(`rtsp://${this.getRtspAddress()}/ISAPI/Streaming/channels/${id}/${params}`, index++); Object.assign(mso.video, channel?.video);