objectdetector: fix availability on devices with no motion sensor

This commit is contained in:
Koushik Dutta
2021-12-10 20:46:05 -08:00
parent 5772641972
commit 72fab49bfb
3 changed files with 6 additions and 7 deletions

View File

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

View File

@@ -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": [

View File

@@ -450,8 +450,7 @@ class ObjectDetectorMixin extends MixinDeviceBase<ObjectDetection> implements Mi
}
async canMixin(type: ScryptedDeviceType, interfaces: string[]): Promise<string[]> {
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;