fix watermarks and graphics when using mid-roll (#2397)

This commit is contained in:
Jason Dove
2025-09-08 10:59:25 +00:00
committed by GitHub
parent d8e8abb691
commit e8b51e8442
2 changed files with 22 additions and 3 deletions
+1
View File
@@ -24,6 +24,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- When ETV does not have permission, startup will fail with logged instructions on how to configure MySql
- Fix scaling anamorphic content in locales that don't use period as a decimal separator (e.g. `,`)
- Block schedules: fix playout build crash when empty collection uses random playback order
- Fix watermarks and graphics elements on primary content split by mid-roll filler
### Changed
- **BREAKING CHANGE**: change how `Scripted Schedule` system works
+21 -3
View File
@@ -41,8 +41,24 @@ public class PlayoutItem
? new DateTimeOffset(GuideFinish.Value, TimeSpan.Zero).ToLocalTime()
: null;
public PlayoutItem ForChapter(MediaChapter chapter) =>
new()
public PlayoutItem ForChapter(MediaChapter chapter)
{
var watermarksCopy = new List<PlayoutItemWatermark>();
if (PlayoutItemWatermarks != null)
{
watermarksCopy.AddRange(
PlayoutItemWatermarks.Select(wm => new PlayoutItemWatermark { WatermarkId = wm.WatermarkId }));
}
var graphicsElementsCopy = new List<PlayoutItemGraphicsElement>();
if (PlayoutItemGraphicsElements != null)
{
graphicsElementsCopy.AddRange(
PlayoutItemGraphicsElements.Select(wm => new PlayoutItemGraphicsElement
{ GraphicsElementId = wm.GraphicsElementId }));
}
return new PlayoutItem
{
MediaItemId = MediaItemId,
MediaItem = MediaItem,
@@ -66,8 +82,10 @@ public class PlayoutItem
BlockKey = BlockKey,
CollectionKey = CollectionKey,
CollectionEtag = CollectionEtag,
PlayoutItemWatermarks = PlayoutItemWatermarks?.ToList()
PlayoutItemWatermarks = watermarksCopy,
PlayoutItemGraphicsElements = graphicsElementsCopy
};
}
public string GetDisplayDuration()
{