Skip to content

Commit

Permalink
unifi-protect: filter out unadopted cams
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Sep 11, 2024
1 parent 56dbecb commit 797ef79
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plugins/unifi-protect/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

{
"scrypted.debugHost": "127.0.0.1",
"scrypted.debugHost": "scrypted-nvr",
}
4 changes: 2 additions & 2 deletions plugins/unifi-protect/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/unifi-protect/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scrypted/unifi-protect",
"version": "0.0.154",
"version": "0.0.155",
"description": "Unifi Protect Plugin for Scrypted",
"author": "Scrypted",
"license": "Apache",
Expand Down
4 changes: 4 additions & 0 deletions plugins/unifi-protect/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ export class UnifiProtect extends ScryptedDeviceBase implements Settings, Device
this.console.log('skipping camera that is adopted by another nvr', camera.id, camera.name);
continue;
}
if (!camera.isAdopted) {
this.console.log('skipping camera that is not adopted', camera.id, camera.name);
continue;
}

let needUpdate = false;
for (const channel of camera.channels) {
Expand Down

0 comments on commit 797ef79

Please sign in to comment.