Skip to content

Commit 56dbecb

Browse files
committed
videoanalsyis: dont allow extension to be disabled.
1 parent 67acb77 commit 56dbecb

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

common/src/autoenable-mixin-provider.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,15 @@ export abstract class AutoenableMixinProvider extends ScryptedDeviceBase {
4141
return true;
4242
}
4343

44+
checkHasEnabledMixin(device: ScryptedDevice) {
45+
return this.hasEnabledMixin[device.id] === this.autoIncludeToken;
46+
}
47+
4448
async maybeEnableMixin(device: ScryptedDevice) {
4549
if (!device || device.mixins?.includes(this.id))
4650
return;
4751

48-
if (this.hasEnabledMixin[device.id] === this.autoIncludeToken)
52+
if (this.checkHasEnabledMixin(device))
4953
return;
5054

5155
const match = await this.canMixin(device.type, device.interfaces);

plugins/diagnostics/src/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ class DiagnosticsPlugin extends ScryptedDeviceBase implements Settings {
211211
const start = Date.now();
212212
await validateMedia(stepName + ' (IDR)', getVideoStream(destination), false, async () => {
213213
const end = Date.now();
214-
if (end - start > 4500)
214+
if (end - start > 5000)
215215
throw new Error(`High IDR Interval. This may cause issues with HomeKit Secure Video. Adjust codec configuration if possible.`);
216216
});
217217
};

plugins/objectdetector/package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/objectdetector/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@scrypted/objectdetector",
3-
"version": "0.1.44",
3+
"version": "0.1.45",
44
"description": "Scrypted Video Analysis Plugin. Installed alongside a detection service like OpenCV or TensorFlow.",
55
"author": "Scrypted",
66
"license": "Apache-2.0",

plugins/objectdetector/src/main.ts

+4
Original file line numberDiff line numberDiff line change
@@ -1059,6 +1059,10 @@ export class ObjectDetectionPlugin extends AutoenableMixinProvider implements Se
10591059
}, 10000)
10601060
}
10611061

1062+
checkHasEnabledMixin(device: ScryptedDevice): boolean {
1063+
return false;
1064+
}
1065+
10621066
pruneOldStatistics() {
10631067
const now = Date.now();
10641068
for (const [k, v] of this.objectDetectionStatistics.entries()) {

0 commit comments

Comments
 (0)