From 72fab49bfb82b9b5c7c2ede04f701696c3eeeedc Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Fri, 10 Dec 2021 20:46:05 -0800 Subject: [PATCH] objectdetector: fix availability on devices with no motion sensor --- plugins/objectdetector/package-lock.json | 4 ++-- plugins/objectdetector/package.json | 6 +++--- plugins/objectdetector/src/main.ts | 3 +-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/plugins/objectdetector/package-lock.json b/plugins/objectdetector/package-lock.json index dbd5f2c15..b15d62641 100644 --- a/plugins/objectdetector/package-lock.json +++ b/plugins/objectdetector/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/objectdetector", - "version": "0.0.20", + "version": "0.0.23", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@scrypted/objectdetector", - "version": "0.0.20", + "version": "0.0.23", "license": "Apache-2.0", "dependencies": { "@scrypted/common": "file:../../common", diff --git a/plugins/objectdetector/package.json b/plugins/objectdetector/package.json index 561396d17..e4d2800e4 100644 --- a/plugins/objectdetector/package.json +++ b/plugins/objectdetector/package.json @@ -1,7 +1,7 @@ { "name": "@scrypted/objectdetector", - "version": "0.0.20", - "description": "Object Detector for VideoCameras. Installed alongside a detection service.", + "version": "0.0.23", + "description": "Scrypted Video Analysis Plugin. Installed alongside a detection service like OpenCV or TensorFlow.", "author": "Scrypted", "license": "Apache-2.0", "scripts": { @@ -30,7 +30,7 @@ "person" ], "scrypted": { - "name": "Object Detector Plugin", + "name": "Video Analysis Plugin", "singleInstance": true, "type": "API", "interfaces": [ diff --git a/plugins/objectdetector/src/main.ts b/plugins/objectdetector/src/main.ts index c0ca2552a..12fe79c23 100644 --- a/plugins/objectdetector/src/main.ts +++ b/plugins/objectdetector/src/main.ts @@ -450,8 +450,7 @@ class ObjectDetectorMixin extends MixinDeviceBase implements Mi } async canMixin(type: ScryptedDeviceType, interfaces: string[]): Promise { - if ((interfaces.includes(ScryptedInterface.VideoCamera) || interfaces.includes(ScryptedInterface.Camera)) - && interfaces.includes(ScryptedInterface.MotionSensor)) { + if (interfaces.includes(ScryptedInterface.VideoCamera) || interfaces.includes(ScryptedInterface.Camera)) { return [ScryptedInterface.ObjectDetector, ScryptedInterface.MotionSensor, ScryptedInterface.Settings]; } return null;