homekit: shot recording options if using a linked motion sensor

This commit is contained in:
Koushik Dutta
2021-11-04 23:38:34 -07:00
parent 0e20d5ebbe
commit 54db19ef0d
3 changed files with 7 additions and 5 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/homekit",
"version": "0.0.117",
"version": "0.0.118",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/homekit",
"version": "0.0.117",
"version": "0.0.118",
"dependencies": {
"hap-nodejs": "file:../../external/HAP-NodeJS",
"lodash": "^4.17.21",

View File

@@ -40,5 +40,5 @@
"@types/qrcode": "^1.4.1",
"@types/url-parse": "^1.4.3"
},
"version": "0.0.117"
"version": "0.0.118"
}

View File

@@ -47,7 +47,9 @@ export class CameraMixin extends SettingsMixinDeviceBase<any> implements Setting
choices: msos.map(mso => mso.name),
});
}
if (this.interfaces.includes(ScryptedInterface.MotionSensor)) {
const hasMotionSensor = this.storage.getItem('linkedMotionSensor') || this.interfaces.includes(ScryptedInterface.MotionSensor);
if (hasMotionSensor) {
if (msos?.length) {
settings.push({
title: 'Recording Stream',
@@ -76,7 +78,7 @@ export class CameraMixin extends SettingsMixinDeviceBase<any> implements Setting
let showTranscodeArgs = this.storage.getItem('transcodeStreaming') === 'true'
|| this.storage.getItem('transcodeStreamingHub') === 'true';
if (this.interfaces.includes(ScryptedInterface.MotionSensor)) {
if (hasMotionSensor) {
settings.push({
title: 'Transcode Recording',
key: 'transcodeRecording',