@blueharford/scrypted-spatial-awareness 0.1.14 → 0.1.15

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/out/plugin.zip CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueharford/scrypted-spatial-awareness",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "Cross-camera object tracking for Scrypted NVR with spatial awareness",
5
5
  "author": "Joshua Seidel <blueharford>",
6
6
  "license": "Apache-2.0",
@@ -186,6 +186,24 @@ export class AlertManager {
186
186
  */
187
187
  private getDefaultNotifiers(): string[] {
188
188
  try {
189
+ // Try new multiple notifiers setting first
190
+ const notifiers = this.storage.getItem('defaultNotifiers');
191
+ if (notifiers) {
192
+ // Could be JSON array or comma-separated string
193
+ try {
194
+ const parsed = JSON.parse(notifiers);
195
+ if (Array.isArray(parsed)) {
196
+ return parsed;
197
+ }
198
+ } catch {
199
+ // Not JSON, might be comma-separated or single value
200
+ if (notifiers.includes(',')) {
201
+ return notifiers.split(',').map(s => s.trim()).filter(Boolean);
202
+ }
203
+ return [notifiers];
204
+ }
205
+ }
206
+ // Fallback to old single notifier setting
189
207
  const defaultNotifier = this.storage.getItem('defaultNotifier');
190
208
  return defaultNotifier ? [defaultNotifier] : [];
191
209
  } catch {
package/src/main.ts CHANGED
@@ -123,10 +123,12 @@ export class SpatialAwarenessPlugin extends ScryptedDeviceBase
123
123
  defaultValue: true,
124
124
  group: 'Alerts',
125
125
  },
126
- defaultNotifier: {
127
- title: 'Default Notifier',
126
+ defaultNotifiers: {
127
+ title: 'Notifiers',
128
128
  type: 'device',
129
+ multiple: true,
129
130
  deviceFilter: `interfaces.includes('${ScryptedInterface.Notifier}')`,
131
+ description: 'Select one or more notifiers to receive alerts',
130
132
  group: 'Alerts',
131
133
  },
132
134