From 3cc128627187468a8a094bea898fa192426a9155 Mon Sep 17 00:00:00 2001 From: Jason Dove Date: Mon, 5 Sep 2022 09:20:11 -0500 Subject: [PATCH] include other videos (ungrouped) in shuffle in order (#953) * include other videos (ungrouped) in shuffle in order * fix id conflict --- CHANGELOG.md | 1 + .../Data/Repositories/MediaCollectionRepository.cs | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b6a3f958..d23cf7a02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Properly scale image-based subtitles - Fix bug where a schedule containing a single item (fixed start and flood) would never finish building a playout - Logic was also added to detect infinite playout build loops in the future and stop them +- Fix bug where `Other Videos` wouldn't be included in scheduling mode `Shuffle In Order` ### Added - Add `Preferred Audio Title` feature diff --git a/ErsatzTV.Infrastructure/Data/Repositories/MediaCollectionRepository.cs b/ErsatzTV.Infrastructure/Data/Repositories/MediaCollectionRepository.cs index d320ed512..2b54fb973 100644 --- a/ErsatzTV.Infrastructure/Data/Repositories/MediaCollectionRepository.cs +++ b/ErsatzTV.Infrastructure/Data/Repositories/MediaCollectionRepository.cs @@ -419,12 +419,20 @@ public class MediaCollectionRepository : IMediaCollectionRepository result.Add( new CollectionWithItems( - id, + id--, items.OfType().Cast().ToList(), true, PlaybackOrder.Chronological, false)); + result.Add( + new CollectionWithItems( + id, + items.OfType().Cast().ToList(), + true, + PlaybackOrder.Chronological, + false)); + return result; }