mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 20:17:03 +00:00
fix(essentials): Fixes SetupCameras to not add duplicate cameras to the list
This commit is contained in:
parent
06fdee313a
commit
97b9ed5016
1 changed files with 13 additions and 6 deletions
|
|
@ -1844,6 +1844,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||
}
|
||||
case "video camera line":
|
||||
{
|
||||
Status.Cameras.Clear();
|
||||
|
||||
JsonConvert.PopulateObject(responseObj.ToString(), Status.Cameras);
|
||||
|
||||
if (!_syncState.CamerasHaveBeenSetUp)
|
||||
|
|
@ -2763,14 +2765,19 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||
continue;
|
||||
}
|
||||
|
||||
var camera = new ZoomRoomCamera(cam.id, cam.Name, this);
|
||||
var existingCam = Cameras.FirstOrDefault((c) => c.Key.Equals(cam.id));
|
||||
|
||||
Cameras.Add(camera);
|
||||
if (existingCam == null)
|
||||
{
|
||||
var camera = new ZoomRoomCamera(cam.id, cam.Name, this);
|
||||
|
||||
if (cam.Selected)
|
||||
{
|
||||
SelectedCamera = camera;
|
||||
}
|
||||
Cameras.Add(camera);
|
||||
|
||||
if (cam.Selected)
|
||||
{
|
||||
SelectedCamera = camera;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (IsInCall)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue