diff --git a/CHANGELOG.md b/CHANGELOG.md index a0577df4a..d5256f207 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Fix `Scaling Behavior` `Crop` when content is smaller than FFmpeg Profile resolution - Now, content will properly scale beyond the desired resolution before cropping - Fix displaying playout item durations that are greater than 24 hours +- Fix building playouts when playlist has been changed to have fewer items ## [0.8.8-beta] - 2024-09-19 ### Added diff --git a/ErsatzTV.Core/Scheduling/PlaylistEnumerator.cs b/ErsatzTV.Core/Scheduling/PlaylistEnumerator.cs index e72c5fb68..3dbeb6142 100644 --- a/ErsatzTV.Core/Scheduling/PlaylistEnumerator.cs +++ b/ErsatzTV.Core/Scheduling/PlaylistEnumerator.cs @@ -195,6 +195,12 @@ public class PlaylistEnumerator : IMediaCollectionEnumerator while (result.State.Index < state.Index) { result.MoveNext(); + + // previous state is no longer valid; playlist now has fewer items + if (result.State.Index == 0) + { + break; + } } return result;