fix scripted pre-roll overlap (#2394)

* fix scripted pre-roll overlap

* cleanup
This commit is contained in:
Jason Dove
2025-09-07 18:36:10 +00:00
committed by GitHub
parent e96ac0202b
commit 906ec44a6e
@@ -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;
}
}