unifi: dont sync isAdoptedByOther devices

This commit is contained in:
Koushik Dutta
2021-09-10 12:16:03 -07:00
parent b0d3d2382a
commit d7e2177eeb
4 changed files with 9 additions and 4 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/unifi-protect",
"version": "0.0.27",
"version": "0.0.29",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/unifi-protect",
"version": "0.0.27",
"version": "0.0.29",
"license": "Apache",
"dependencies": {
"@types/ws": "^7.4.7",

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/unifi-protect",
"version": "0.0.27",
"version": "0.0.29",
"description": "Unifi Protect Plugin for Scrypted",
"author": "Scrypted",
"license": "Apache",

View File

@@ -189,6 +189,11 @@ class UnifiProtect extends ScryptedDeviceBase implements Settings, DeviceProvide
}
for (let camera of this.api.Cameras) {
if (camera.isAdoptedByOther) {
this.console.log('skipping camera that is adopted by another nvr', camera.id, camera.name);
continue;
}
let needUpdate = false;
for (const channel of camera.channels) {
if (channel.idrInterval !== 4 || !channel.isRtspEnabled) {