videoanalysis: nre check release

This commit is contained in:
Koushik Dutta
2024-02-18 09:46:51 -08:00
parent 1306eda422
commit 32f0d675bc
3 changed files with 5 additions and 5 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/objectdetector",
"version": "0.1.27",
"version": "0.1.28",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/objectdetector",
"version": "0.1.27",
"version": "0.1.28",
"license": "Apache-2.0",
"dependencies": {
"@scrypted/common": "file:../../common",

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/objectdetector",
"version": "0.1.27",
"version": "0.1.28",
"description": "Scrypted Video Analysis Plugin. Installed alongside a detection service like OpenCV or TensorFlow.",
"author": "Scrypted",
"license": "Apache-2.0",

View File

@@ -918,7 +918,7 @@ class ObjectDetectorMixin extends MixinDeviceBase<ObjectDetection> implements Mi
async releaseMixin(id: string, mixinDevice: ObjectDetectionMixin) {
this.currentMixins.delete(mixinDevice);
return mixinDevice.release();
return mixinDevice?.release();
}
release(): void {
@@ -1185,7 +1185,7 @@ export class ObjectDetectionPlugin extends AutoenableMixinProvider implements Se
// what does this mean to make a mixin provider no longer available?
// just ignore it until reboot?
this.currentMixins.delete(mixinDevice);
return mixinDevice.release();
return mixinDevice?.release();
}
async getCreateDeviceSettings(): Promise<Setting[]> {