mirror of
https://github.com/koush/scrypted.git
synced 2026-02-11 01:32:02 +00:00
hikvision: fix camera number detection when more than 10 cameras
This commit is contained in:
4
plugins/hikvision/package-lock.json
generated
4
plugins/hikvision/package-lock.json
generated
@@ -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",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scrypted/hikvision",
|
||||
"version": "0.0.108",
|
||||
"version": "0.0.109",
|
||||
"description": "HikVision Plugin for Scrypted",
|
||||
"author": "Scrypted",
|
||||
"license": "Apache",
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user