@apocaliss92/scrypted-reolink-native 0.1.38 → 0.1.40

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.1.38",
3
+ "version": "0.1.40",
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",
package/src/common.ts CHANGED
@@ -304,8 +304,8 @@ export abstract class CommonCameraMixin extends BaseBaichuanClass implements Vid
304
304
  title: 'Discovery Method',
305
305
  description: 'UDP discovery method for battery cameras (BCUDP).',
306
306
  type: 'string',
307
- choices: ['local', 'remote', 'map', 'relay'],
308
- defaultValue: 'local',
307
+ choices: ['local-direct', 'local-broadcast', 'remote', 'map', 'relay'],
308
+ defaultValue: 'local-direct',
309
309
  hide: true,
310
310
  onPut: async () => {
311
311
  await this.credentialsChanged();
@@ -761,6 +761,7 @@ export abstract class CommonCameraMixin extends BaseBaichuanClass implements Vid
761
761
  start,
762
762
  end,
763
763
  streamType: "main",
764
+ source: "baichuan"
764
765
  });
765
766
 
766
767
  logger.debug(`[NVR VOD] Found ${enrichedRecordings.length} enriched recordings from NVR`);
@@ -2478,7 +2479,7 @@ export abstract class CommonCameraMixin extends BaseBaichuanClass implements Vid
2478
2479
  this.storageSettings.settings.teleChannel.hide = !this.isMultiFocal;
2479
2480
 
2480
2481
  this.storageSettings.settings.uid.hide = !this.isBattery;
2481
- this.storageSettings.settings.discoveryMethod.hide = !this.isBattery;
2482
+ this.storageSettings.settings.discoveryMethod.hide = !this.isBattery && !this.nvrDevice;
2482
2483
 
2483
2484
  if (this.isBattery && !this.storageSettings.values.mixinsSetup) {
2484
2485
  try {
package/src/connect.ts CHANGED
@@ -9,7 +9,7 @@ export type BaichuanConnectInputs = {
9
9
  uid?: string;
10
10
  logger?: Console;
11
11
  debugOptions?: BaichuanClientOptions['debugOptions'];
12
- udpDiscoveryMethod?: "local" | "remote" | "map" | "relay";
12
+ udpDiscoveryMethod?: BaichuanClientOptions["udpDiscoveryMethod"];
13
13
  };
14
14
 
15
15
  export function normalizeUid(uid?: string): string | undefined {
package/src/nvr.ts CHANGED
@@ -533,7 +533,10 @@ export class ReolinkNativeNvrDevice extends BaseBaichuanClass implements Setting
533
533
 
534
534
  this.channelToNativeIdMap.set(channel, nativeId);
535
535
 
536
- if (sdk.deviceManager.getNativeIds().includes(nativeId)) {
536
+ const allNativeIds = sdk.deviceManager.getNativeIds();
537
+
538
+ if (allNativeIds.some(nativeId => nativeId.includes(uid)) ||
539
+ allNativeIds.includes(nativeId)) {
537
540
  continue;
538
541
  }
539
542