add option to stop scheduling before or after block duration end (#1563)

This commit is contained in:
Jason Dove
2024-01-16 12:53:56 -06:00
committed by GitHub
parent 4805d0d40f
commit 88fac0de04
16 changed files with 9931 additions and 7 deletions
@@ -137,6 +137,18 @@ public class BlockPlayoutBuilder(
BlockKey = JsonConvert.SerializeObject(effectiveBlock.BlockKey)
};
if (effectiveBlock.Block.StopScheduling is BlockStopScheduling.BeforeDurationEnd
&& playoutItem.FinishOffset > blockFinish)
{
Logger.LogDebug(
"Current time {Time} for block {Block} would go beyond block finish {Finish}; will not schedule more items",
currentTime,
effectiveBlock.Block.Name,
blockFinish);
break;
}
playout.Items.Add(playoutItem);
// create a playout history record