Browse Source

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

pull/2398/head
Jason Dove 4 months ago committed by GitHub
parent
commit
e8b51e8442
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 24
      ErsatzTV.Core/Domain/PlayoutItem.cs

1
CHANGELOG.md

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

24
ErsatzTV.Core/Domain/PlayoutItem.cs

@ -41,8 +41,24 @@ public class PlayoutItem @@ -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 @@ -66,8 +82,10 @@ public class PlayoutItem
BlockKey = BlockKey,
CollectionKey = CollectionKey,
CollectionEtag = CollectionEtag,
PlayoutItemWatermarks = PlayoutItemWatermarks?.ToList()
PlayoutItemWatermarks = watermarksCopy,
PlayoutItemGraphicsElements = graphicsElementsCopy
};
}
public string GetDisplayDuration()
{

Loading…
Cancel
Save