Browse Source

fix playout building (#486)

pull/487/head
Jason Dove 4 years ago committed by GitHub
parent
commit
6ea3191cf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 6
      ErsatzTV.Core/Scheduling/PlayoutBuilder.cs

1
CHANGELOG.md

@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased] ## [Unreleased]
### Fixed ### Fixed
- Include other video title in channel guide (xmltv) - Include other video title in channel guide (xmltv)
- Fix bug introduced with 0.2.4-alpha that caused some playouts to build from year 0
### Added ### Added
- Build osx-arm64 packages on release - Build osx-arm64 packages on release

6
ErsatzTV.Core/Scheduling/PlayoutBuilder.cs

@ -89,6 +89,12 @@ namespace ErsatzTV.Core.Scheduling
playout.ProgramScheduleAnchors.Clear(); playout.ProgramScheduleAnchors.Clear();
} }
// this works around weird EF behavior
if (playout.Anchor?.NextStart.Year < 2021)
{
playout.Anchor = null;
}
var sortedScheduleItems = playout.ProgramSchedule.Items.OrderBy(i => i.Index).ToList(); var sortedScheduleItems = playout.ProgramSchedule.Items.OrderBy(i => i.Index).ToList();
var collectionEnumerators = new Dictionary<CollectionKey, IMediaCollectionEnumerator>(); var collectionEnumerators = new Dictionary<CollectionKey, IMediaCollectionEnumerator>();
foreach ((CollectionKey collectionKey, List<MediaItem> mediaItems) in collectionMediaItems) foreach ((CollectionKey collectionKey, List<MediaItem> mediaItems) in collectionMediaItems)

Loading…
Cancel
Save