hikvision: fix camera number detection when more than 10 cameras

This commit is contained in:
Koushik Dutta
2022-10-30 09:58:41 -07:00
parent e6f50c3bc2
commit 0cb70778db
3 changed files with 4 additions and 4 deletions

View File

@@ -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",

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/hikvision",
"version": "0.0.108",
"version": "0.0.109",
"description": "HikVision Plugin for Scrypted",
"author": "Scrypted",
"license": "Apache",

View File

@@ -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);