@apocaliss92/scrypted-reolink-native 0.4.47 → 0.4.48

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/plugin.zip CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apocaliss92/scrypted-reolink-native",
3
- "version": "0.4.47",
3
+ "version": "0.4.48",
4
4
  "description": "Use any reolink camera with Scrypted, even older/unsupported models without HTTP protocol support",
5
5
  "author": "@apocaliss92",
6
6
  "license": "Apache",
@@ -67,7 +67,15 @@ export class ReolinkNativeIntercom
67
67
  if (!match) return;
68
68
 
69
69
  // Only auto-enable for cameras provided by our own plugin
70
- if (!this.plugin?.camerasMap?.has(device.id)) return;
70
+ const camera = this.plugin?.camerasMap?.get(device.id);
71
+ if (!camera) return;
72
+
73
+ // Only auto-enable if the camera actually supports intercom.
74
+ // If capabilities aren't loaded yet, skip — we'll be called again
75
+ // when the device descriptor updates after capability detection.
76
+ const caps = camera.cachedCapabilities;
77
+ if (!caps) return;
78
+ if (!caps.hasIntercom) return;
71
79
 
72
80
  this.console.log(`Auto-enabling intercom mixin for ${device.name}`);
73
81
  const mixins = (device.mixins || []).slice();