Merge pull request #846 from PepperDash/hotfix/zoom-meetings-simpl

This commit is contained in:
Neil Dorin
2021-10-07 12:48:32 -06:00
committed by GitHub
2 changed files with 27 additions and 5 deletions

View File

@@ -298,6 +298,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
}
LinkVideoCodecToApi(codec, trilist, joinMap);
trilist.OnlineStatusChange += (device, args) =>
{
if (!args.DeviceOnLine) return;
trilist.SetString(joinMap.Schedule.JoinNumber, "\xFC");
};
}
/// <summary>
@@ -785,6 +792,16 @@ ScreenIndexIsPinnedTo: {8} (a{17})
_currentMeetings = codec.CodecSchedule.Meetings.Where(m => m.StartTime >= currentTime || m.EndTime >= currentTime).ToList();
if (_currentMeetings.Count == 0)
{
var emptyXSigByteArray = XSigHelpers.ClearOutputs();
var emptyXSigString = Encoding.GetEncoding(XSigEncoding)
.GetString(emptyXSigByteArray, 0, emptyXSigByteArray.Length);
trilist.SetString(joinMap.Schedule.JoinNumber, emptyXSigString);
return;
}
var meetingsData = UpdateMeetingsListXSig(_currentMeetings);
trilist.SetString(joinMap.Schedule.JoinNumber, meetingsData);
trilist.SetUshort(joinMap.MeetingCount.JoinNumber, (ushort)_currentMeetings.Count);

View File

@@ -1306,11 +1306,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
var codecBookings = JsonConvert.DeserializeObject<List<zCommand.BookingsListResult>>(
responseObj.ToString());
if (codecBookings != null && codecBookings.Count > 0)
{
CodecSchedule.Meetings = zCommand.GetGenericMeetingsFromBookingResult(
codecBookings, CodecSchedule.MeetingWarningMinutes);
}
if (codecBookings != null && codecBookings.Count > 0)
{
CodecSchedule.Meetings = zCommand.GetGenericMeetingsFromBookingResult(
codecBookings, CodecSchedule.MeetingWarningMinutes);
}
else
{
//need to clear the list if it's empty
CodecSchedule.Meetings = new List<Meeting>();
}
break;
}