fix playout build failures due to playlist enumerator access (#2801)
This commit is contained in:
@@ -55,6 +55,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Sync Plex episode title, plot, year, date added, release date, episode number changes
|
||||
- Sync Jellyfin and Emby library name and type changes
|
||||
- Library type (movies, shows) can only be changed when synchronization is *disabled* for the library in ETV
|
||||
- Fix some sequential and scripted playout build failures when using playlists or marathons
|
||||
|
||||
## [26.1.1] - 2026-01-08
|
||||
### Fixed
|
||||
|
||||
@@ -444,9 +444,13 @@ public class SchedulingEngine(
|
||||
return false;
|
||||
}
|
||||
|
||||
int enumeratorCount = enumeratorDetails.Enumerator is PlaylistEnumerator playlistEnumerator
|
||||
? playlistEnumerator.CountForFiller
|
||||
: enumeratorDetails.Enumerator.Count;
|
||||
|
||||
return AddCountInternal(
|
||||
enumeratorDetails,
|
||||
enumeratorDetails.Enumerator.Count,
|
||||
enumeratorCount,
|
||||
fillerKind,
|
||||
customTitle,
|
||||
disableWatermarks);
|
||||
|
||||
@@ -31,7 +31,11 @@ public class YamlPlayoutAllHandler(EnumeratorCache enumeratorCache) : YamlPlayou
|
||||
|
||||
foreach (IMediaCollectionEnumerator enumerator in maybeEnumerator)
|
||||
{
|
||||
for (var i = 0; i < enumerator.Count; i++)
|
||||
int enumeratorCount = enumerator is PlaylistEnumerator playlistEnumerator
|
||||
? playlistEnumerator.CountForFiller
|
||||
: enumerator.Count;
|
||||
|
||||
for (var i = 0; i < enumeratorCount; i++)
|
||||
{
|
||||
foreach (string preRollSequence in context.GetPreRollSequence())
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ public class YamlPlayoutSkipItemsHandler(EnumeratorCache enumeratorCache) : IYam
|
||||
int seed = context.Playout.Seed + context.InstructionIndex + context.CurrentTime.DayOfYear;
|
||||
var random = new Random(seed);
|
||||
int enumeratorCount = enumerator is PlaylistEnumerator playlistEnumerator
|
||||
? playlistEnumerator.CountForRandom
|
||||
? playlistEnumerator.CountForFiller
|
||||
: enumerator.Count;
|
||||
var expression = new Expression(skipItems.SkipItems);
|
||||
expression.EvaluateParameter += (name, e) =>
|
||||
@@ -53,7 +53,7 @@ public class YamlPlayoutSkipItemsHandler(EnumeratorCache enumeratorCache) : IYam
|
||||
_ => 0
|
||||
};
|
||||
|
||||
skipCount %= enumerator.Count;
|
||||
skipCount %= enumeratorCount;
|
||||
|
||||
if (skipCount < 0)
|
||||
{
|
||||
|
||||
@@ -40,7 +40,12 @@ public class YamlPlayoutSkipToItemHandler(EnumeratorCache enumeratorCache) : IYa
|
||||
foreach (IMediaCollectionEnumerator enumerator in maybeEnumerator)
|
||||
{
|
||||
var done = false;
|
||||
for (var index = 0; index < enumerator.Count; index++)
|
||||
|
||||
int enumeratorCount = enumerator is PlaylistEnumerator playlistEnumerator
|
||||
? playlistEnumerator.CountForFiller
|
||||
: enumerator.Count;
|
||||
|
||||
for (var index = 0; index < enumeratorCount; index++)
|
||||
{
|
||||
if (done)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user