diff --git a/ErsatzTV.Core.Tests/Scheduling/PlayoutModeSchedulerFloodTests.cs b/ErsatzTV.Core.Tests/Scheduling/PlayoutModeSchedulerFloodTests.cs index 79e2183ba..3d3709b98 100644 --- a/ErsatzTV.Core.Tests/Scheduling/PlayoutModeSchedulerFloodTests.cs +++ b/ErsatzTV.Core.Tests/Scheduling/PlayoutModeSchedulerFloodTests.cs @@ -79,7 +79,7 @@ namespace ErsatzTV.Core.Tests.Scheduling playoutItems[2].FillerKind.Should().Be(FillerKind.None); } - [Test] + [Test] public void Should_Fill_Exactly_To_Next_Schedule_Item_Flood() { Collection collectionOne = TwoItemCollection(1, 2, TimeSpan.FromHours(1)); diff --git a/ErsatzTV.Core/Scheduling/PlayoutModeSchedulerFlood.cs b/ErsatzTV.Core/Scheduling/PlayoutModeSchedulerFlood.cs index 73613aa37..48c369683 100644 --- a/ErsatzTV.Core/Scheduling/PlayoutModeSchedulerFlood.cs +++ b/ErsatzTV.Core/Scheduling/PlayoutModeSchedulerFlood.cs @@ -72,10 +72,10 @@ namespace ErsatzTV.Core.Scheduling itemDuration, itemChapters); - // if the current time is before the next schedule item, but the current finish - // is after, we need to move on to the next schedule item - willFinishInTime = itemStartTime > peekScheduleItemStart || - itemEndTimeWithFiller <= peekScheduleItemStart; + // if the next schedule item is supposed to start during this item, + // don't schedule this item and just move on + willFinishInTime = peekScheduleItemStart < itemStartTime || + peekScheduleItemStart >= itemEndTimeWithFiller; if (willFinishInTime) {