mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 03:57:27 +00:00
add config object to stop downloading large phonebooks
This commit is contained in:
parent
4b9d7d1a1f
commit
e365944dc3
2 changed files with 12 additions and 4 deletions
|
|
@ -39,10 +39,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||
private int _previousVolumeLevel;
|
||||
private CameraBase _selectedCamera;
|
||||
|
||||
private readonly ZoomRoomPropertiesConfig _props;
|
||||
|
||||
public ZoomRoom(DeviceConfig config, IBasicCommunication comm)
|
||||
: base(config)
|
||||
{
|
||||
var props = JsonConvert.DeserializeObject<ZoomRoomPropertiesConfig>(config.Properties.ToString());
|
||||
_props = JsonConvert.DeserializeObject<ZoomRoomPropertiesConfig>(config.Properties.ToString());
|
||||
|
||||
// The queue that will collect the repsonses in the order they are received
|
||||
_receiveQueue = new CrestronQueue<string>(1024);
|
||||
|
|
@ -52,10 +54,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||
|
||||
Communication = comm;
|
||||
|
||||
if (props.CommunicationMonitorProperties != null)
|
||||
if (_props.CommunicationMonitorProperties != null)
|
||||
{
|
||||
CommunicationMonitor = new GenericCommunicationMonitor(this, Communication,
|
||||
props.CommunicationMonitorProperties);
|
||||
_props.CommunicationMonitorProperties);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -625,7 +627,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||
|
||||
// zCommand
|
||||
|
||||
_syncState.AddQueryToQueue("zCommand Phonebook List Offset: 0 Limit: 512");
|
||||
if (!_props.DisablePhonebookAutoDownload)
|
||||
{
|
||||
_syncState.AddQueryToQueue("zCommand Phonebook List Offset: 0 Limit: 512");
|
||||
}
|
||||
|
||||
_syncState.AddQueryToQueue("zCommand Bookings List");
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -12,5 +12,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||
public class ZoomRoomPropertiesConfig
|
||||
{
|
||||
public CommunicationMonitorConfig CommunicationMonitorProperties { get; set; }
|
||||
|
||||
public bool DisablePhonebookAutoDownload { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue