fix adding pad filler to short content (#1806)

This commit is contained in:
Jason Dove
2024-07-25 19:14:16 -05:00
committed by GitHub
parent b1b2c2a1e0
commit 50f2cb7a33
2 changed files with 5 additions and 1 deletions
+1
View File
@@ -31,6 +31,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fix filler preset editor and deco dead air fallback editor to only show supported collection types
- Fix infinite loop caused by impossible schedule (all collection items longer than schedule item duration)
- Fix selecting audio and subtitle streams with two-letter language codes
- Fix adding pad filler to content that is less than one minute in duration
### Changed
- Remove some unnecessary API calls related to media server scanning and paging
@@ -417,7 +417,6 @@ public abstract class PlayoutModeSchedulerBase<T> : IPlayoutModeScheduler<T> whe
TimeSpan.FromMinutes(currentMinute) +
TimeSpan.FromMinutes(targetMinute);
var targetTime = new DateTimeOffset(
almostTargetTime.Year,
almostTargetTime.Month,
@@ -427,6 +426,10 @@ public abstract class PlayoutModeSchedulerBase<T> : IPlayoutModeScheduler<T> whe
0,
almostTargetTime.Offset);
// ensure filler works for content less than one minute
if (targetTime <= playoutItem.StartOffset + totalDuration)
targetTime = targetTime.AddMinutes(padFiller.PadToNearestMinute.Value);
TimeSpan remainingToFill = targetTime - totalDuration - playoutItem.StartOffset;
// Logger.LogInformation(