Browse Source

clarify flood scheduling calc [no ci]

pull/579/head
Jason Dove 5 years ago
parent
commit
7a88374362
  1. 2
      ErsatzTV.Core.Tests/Scheduling/PlayoutModeSchedulerFloodTests.cs
  2. 8
      ErsatzTV.Core/Scheduling/PlayoutModeSchedulerFlood.cs

2
ErsatzTV.Core.Tests/Scheduling/PlayoutModeSchedulerFloodTests.cs

@ -79,7 +79,7 @@ namespace ErsatzTV.Core.Tests.Scheduling
playoutItems[2].FillerKind.Should().Be(FillerKind.None); playoutItems[2].FillerKind.Should().Be(FillerKind.None);
} }
[Test] [Test]
public void Should_Fill_Exactly_To_Next_Schedule_Item_Flood() public void Should_Fill_Exactly_To_Next_Schedule_Item_Flood()
{ {
Collection collectionOne = TwoItemCollection(1, 2, TimeSpan.FromHours(1)); Collection collectionOne = TwoItemCollection(1, 2, TimeSpan.FromHours(1));

8
ErsatzTV.Core/Scheduling/PlayoutModeSchedulerFlood.cs

@ -72,10 +72,10 @@ namespace ErsatzTV.Core.Scheduling
itemDuration, itemDuration,
itemChapters); itemChapters);
// if the current time is before the next schedule item, but the current finish // if the next schedule item is supposed to start during this item,
// is after, we need to move on to the next schedule item // don't schedule this item and just move on
willFinishInTime = itemStartTime > peekScheduleItemStart || willFinishInTime = peekScheduleItemStart < itemStartTime ||
itemEndTimeWithFiller <= peekScheduleItemStart; peekScheduleItemStart >= itemEndTimeWithFiller;
if (willFinishInTime) if (willFinishInTime)
{ {

Loading…
Cancel
Save