validate filler mode pad settings (#1516)

This commit is contained in:
Jason Dove
2023-11-26 12:54:06 -06:00
committed by GitHub
parent 7586647b73
commit c6ed258021
3 changed files with 17 additions and 0 deletions
@@ -223,6 +223,17 @@ public abstract class PlayoutModeSchedulerBase<T> : IPlayoutModeScheduler<T> whe
Logger.LogError("Multiple pad-to-nearest-minute values are invalid; no filler will be used");
return new List<PlayoutItem> { playoutItem };
}
// missing pad-to-nearest-minute value is invalid; use no filler
FillerPreset invalidPadFiller = allFiller
.FirstOrDefault(f => f.FillerMode == FillerMode.Pad && f.PadToNearestMinute.HasValue == false);
if (invalidPadFiller is not null)
{
Logger.LogError(
"Pad filler ({Filler}) without pad-to-nearest-minute value is invalid; no filler will be used",
invalidPadFiller.Name);
return new List<PlayoutItem> { playoutItem };
}
List<MediaChapter> effectiveChapters = chapters;
if (allFiller.All(fp => fp.FillerKind != FillerKind.MidRoll) || effectiveChapters.Count <= 1)