Browse Source

fix scripted pre-roll overlap (#2394)

* fix scripted pre-roll overlap

* cleanup
pull/2395/head
Jason Dove 4 months ago committed by GitHub
parent
commit
906ec44a6e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      ErsatzTV.Core/Scheduling/Engine/SchedulingEngine.cs

3
ErsatzTV.Core/Scheduling/Engine/SchedulingEngine.cs

@ -715,6 +715,9 @@ public class SchedulingEngine( @@ -715,6 +715,9 @@ public class SchedulingEngine(
remainingToFill = targetTime - _state.CurrentTime;
if (remainingToFill <= TimeSpan.Zero)
{
// TODO: this shouldn't be needed, but prevents overlap
_state.AddedItems.RemoveAll(pi => pi.FinishOffset >= targetTime);
_state.CurrentTime = _state.AddedItems.Max(pi => pi.FinishOffset);
break;
}
}

Loading…
Cancel
Save