Browse Source

fix adding pad filler to short content (#1806)

pull/1809/head
Jason Dove 2 years ago committed by GitHub
parent
commit
50f2cb7a33
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 5
      ErsatzTV.Core/Scheduling/PlayoutModeSchedulerBase.cs

1
CHANGELOG.md

@ -31,6 +31,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). @@ -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

5
ErsatzTV.Core/Scheduling/PlayoutModeSchedulerBase.cs

@ -417,7 +417,6 @@ public abstract class PlayoutModeSchedulerBase<T> : IPlayoutModeScheduler<T> whe @@ -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 @@ -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(

Loading…
Cancel
Save