@apocaliss92/scrypted-reolink-native 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.nodejs.js +1 -1
- package/dist/plugin.zip +0 -0
- package/package.json +1 -1
- package/src/camera.ts +8 -2
- package/src/multiFocal.ts +2 -2
- package/src/utils.ts +3 -3
package/dist/plugin.zip
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/src/camera.ts
CHANGED
|
@@ -2617,7 +2617,7 @@ export class ReolinkCamera extends BaseBaichuanClass implements VideoCamera, Cam
|
|
|
2617
2617
|
const { interfaces, type } = getDeviceInterfaces({
|
|
2618
2618
|
capabilities,
|
|
2619
2619
|
logger: this.console,
|
|
2620
|
-
|
|
2620
|
+
isLensDevice: !!this.multiFocalDevice,
|
|
2621
2621
|
});
|
|
2622
2622
|
|
|
2623
2623
|
const device: Device = {
|
|
@@ -2634,7 +2634,7 @@ export class ReolinkCamera extends BaseBaichuanClass implements VideoCamera, Cam
|
|
|
2634
2634
|
await sdk.deviceManager.onDeviceDiscovered(device);
|
|
2635
2635
|
|
|
2636
2636
|
logger.log(`Device interfaces updated`);
|
|
2637
|
-
logger.debug(JSON.stringify({ hasNvr: !!this.nvrDevice, hasMultiFocal: !!this.multiFocalDevice, hasPlugin: !!this.plugin }));
|
|
2637
|
+
logger.debug(JSON.stringify({ interfaces, isLensDevice: !!this.multiFocalDevice, hasNvr: !!this.nvrDevice, hasMultiFocal: !!this.multiFocalDevice, hasPlugin: !!this.plugin }));
|
|
2638
2638
|
logger.debug(`${JSON.stringify(device)}`);
|
|
2639
2639
|
} catch (e) {
|
|
2640
2640
|
logger.error('Failed to update device interfaces', e?.message || String(e));
|
|
@@ -2698,6 +2698,12 @@ export class ReolinkCamera extends BaseBaichuanClass implements VideoCamera, Cam
|
|
|
2698
2698
|
this.storageSettings.settings.clipsSource.hide = !this.nvrDevice;
|
|
2699
2699
|
this.storageSettings.settings.clipsSource.defaultValue = this.nvrDevice ? "NVR" : "Device";
|
|
2700
2700
|
|
|
2701
|
+
this.storageSettings.settings.enableVideoclips.hide = !!this.multiFocalDevice;
|
|
2702
|
+
this.storageSettings.settings.videoclipsDaysToPreload.hide = !!this.multiFocalDevice;
|
|
2703
|
+
this.storageSettings.settings.videoclipsRegularChecks.hide = !!this.multiFocalDevice;
|
|
2704
|
+
this.storageSettings.settings.loadVideoclips.hide = !!this.multiFocalDevice;
|
|
2705
|
+
this.storageSettings.settings.downloadVideoclipsLocally.hide = !!this.multiFocalDevice;
|
|
2706
|
+
|
|
2701
2707
|
this.storageSettings.settings.videoclipsRegularChecks.defaultValue = this.isBattery ? 120 : 30;
|
|
2702
2708
|
|
|
2703
2709
|
this.storageSettings.settings.batteryUpdateIntervalMinutes.hide = !this.isBattery;
|
package/src/multiFocal.ts
CHANGED
|
@@ -50,10 +50,10 @@ export class ReolinkNativeMultiFocalDevice extends ReolinkCamera implements Sett
|
|
|
50
50
|
const { interfaces } = getDeviceInterfaces({
|
|
51
51
|
capabilities,
|
|
52
52
|
logger,
|
|
53
|
-
lensType
|
|
53
|
+
isLensDevice: !!lensType
|
|
54
54
|
});
|
|
55
55
|
|
|
56
|
-
logger.debug(`Interfaces found for lens ${lensType}: ${JSON.stringify({ interfaces, capabilities, multifocalInfo })}`);
|
|
56
|
+
logger.debug(`Interfaces found for lens ${lensType}: ${JSON.stringify({ interfaces, capabilities, multifocalInfo, isLensDevice: !!lensType })}`);
|
|
57
57
|
|
|
58
58
|
return { interfaces, capabilities };
|
|
59
59
|
}
|
package/src/utils.ts
CHANGED
|
@@ -59,9 +59,9 @@ export const pirSuffix = `-pir`;
|
|
|
59
59
|
export const getDeviceInterfaces = (props: {
|
|
60
60
|
capabilities: DeviceCapabilities,
|
|
61
61
|
logger: Console,
|
|
62
|
-
|
|
62
|
+
isLensDevice?: boolean
|
|
63
63
|
}) => {
|
|
64
|
-
const { capabilities, logger,
|
|
64
|
+
const { capabilities, logger, isLensDevice } = props;
|
|
65
65
|
|
|
66
66
|
const interfaces = [
|
|
67
67
|
ScryptedInterface.VideoCamera,
|
|
@@ -74,7 +74,7 @@ export const getDeviceInterfaces = (props: {
|
|
|
74
74
|
ScryptedInterface.VideoTextOverlays,
|
|
75
75
|
];
|
|
76
76
|
|
|
77
|
-
if (!
|
|
77
|
+
if (!isLensDevice) {
|
|
78
78
|
interfaces.push(ScryptedInterface.VideoClips);
|
|
79
79
|
}
|
|
80
80
|
|