Skip to content

Commit

Permalink
reolink: fix errant device provider on all devices
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Jun 25, 2024
1 parent e64a66a commit 76efef3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions plugins/reolink/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/reolink/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scrypted/reolink",
"version": "0.0.69",
"version": "0.0.70",
"description": "Reolink Plugin for Scrypted",
"author": "Scrypted",
"license": "Apache",
Expand Down
2 changes: 1 addition & 1 deletion plugins/reolink/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class ReolinkCamera extends RtspSmartCamera implements Camera, DeviceProvider, R
if (this.storageSettings.values.hasObjectDetector) {
interfaces.push(ScryptedInterface.ObjectDetector);
}
if (this.storageSettings.values.abilities?.Ability?.supportAudioAlarm?.ver !== 0) {
if (this.storageSettings.values.abilities?.Ability?.supportAudioAlarm?.ver && this.storageSettings.values.abilities?.Ability?.supportAudioAlarm?.ver !== 0) {
interfaces.push(ScryptedInterface.DeviceProvider);
}
await this.provider.updateDevice(this.nativeId, name, interfaces, type);
Expand Down

0 comments on commit 76efef3

Please sign in to comment.