mirror of
https://github.com/koush/scrypted.git
synced 2026-07-08 08:10:37 +01:00
objectdetector: fix availability on devices with no motion sensor
This commit is contained in:
4
plugins/objectdetector/package-lock.json
generated
4
plugins/objectdetector/package-lock.json
generated
@@ -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",
|
||||
|
||||
@@ -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": [
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user