unifi-protect: filter out unadopted cams

This commit is contained in:
Koushik Dutta
2024-09-11 09:28:10 -07:00
parent 56dbecbf3d
commit 797ef79080
4 changed files with 8 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
{
"scrypted.debugHost": "127.0.0.1",
"scrypted.debugHost": "scrypted-nvr",
}

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/unifi-protect",
"version": "0.0.154",
"version": "0.0.155",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/unifi-protect",
"version": "0.0.154",
"version": "0.0.155",
"license": "Apache",
"dependencies": {
"@koush/unifi-protect": "file:../../external/unifi-protect",

View File

@@ -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",

View File

@@ -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) {