diff --git a/CHANGELOG.md b/CHANGELOG.md index 23b7c8acf..5b2e637bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - The issue appears to be caused by using a thread count other than `1` - Thread count is now forced to `1` for all streaming modes other than HLS Segmenter - Fix bug with HLS Segmenter in cultures where `.` is a group/thousands separator +- Fix search results page crashing with some media kinds ### Changed - Upgrade ffmpeg from 4.4 to 5.0 in all docker images diff --git a/ErsatzTV.Infrastructure/Data/Repositories/MovieRepository.cs b/ErsatzTV.Infrastructure/Data/Repositories/MovieRepository.cs index 94fe653a3..09f0dd54d 100644 --- a/ErsatzTV.Infrastructure/Data/Repositories/MovieRepository.cs +++ b/ErsatzTV.Infrastructure/Data/Repositories/MovieRepository.cs @@ -153,8 +153,10 @@ namespace ErsatzTV.Infrastructure.Data.Repositories .AsNoTracking() .Filter(mm => ids.Contains(mm.MovieId)) .Include(mm => mm.Artwork) - .OrderBy(mm => mm.SortTitle) .Include(mm => mm.Movie) + .ThenInclude(m => m.MediaVersions) + .ThenInclude(mv => mv.MediaFiles) + .OrderBy(mm => mm.SortTitle) .ToListAsync(); } diff --git a/ErsatzTV.Infrastructure/Data/Repositories/MusicVideoRepository.cs b/ErsatzTV.Infrastructure/Data/Repositories/MusicVideoRepository.cs index 5557be2a5..32028b21b 100644 --- a/ErsatzTV.Infrastructure/Data/Repositories/MusicVideoRepository.cs +++ b/ErsatzTV.Infrastructure/Data/Repositories/MusicVideoRepository.cs @@ -133,6 +133,9 @@ namespace ErsatzTV.Infrastructure.Data.Repositories .Include(mvm => mvm.MusicVideo) .ThenInclude(mv => mv.Artist) .ThenInclude(a => a.ArtistMetadata) + .Include(mvm => mvm.MusicVideo) + .ThenInclude(e => e.MediaVersions) + .ThenInclude(mv => mv.MediaFiles) .Include(mvm => mvm.Artwork) .OrderBy(mvm => mvm.SortTitle) .ToListAsync(); diff --git a/ErsatzTV.Infrastructure/Data/Repositories/OtherVideoRepository.cs b/ErsatzTV.Infrastructure/Data/Repositories/OtherVideoRepository.cs index 0f2db998f..47df07b06 100644 --- a/ErsatzTV.Infrastructure/Data/Repositories/OtherVideoRepository.cs +++ b/ErsatzTV.Infrastructure/Data/Repositories/OtherVideoRepository.cs @@ -100,6 +100,9 @@ namespace ErsatzTV.Infrastructure.Data.Repositories .Filter(ovm => ids.Contains(ovm.OtherVideoId)) .Include(ovm => ovm.OtherVideo) .Include(ovm => ovm.Artwork) + .Include(ovm => ovm.OtherVideo) + .ThenInclude(ov => ov.MediaVersions) + .ThenInclude(mv => mv.MediaFiles) .OrderBy(ovm => ovm.SortTitle) .ToListAsync(); } diff --git a/ErsatzTV.Infrastructure/Data/Repositories/SongRepository.cs b/ErsatzTV.Infrastructure/Data/Repositories/SongRepository.cs index 9a16c858d..52b512c50 100644 --- a/ErsatzTV.Infrastructure/Data/Repositories/SongRepository.cs +++ b/ErsatzTV.Infrastructure/Data/Repositories/SongRepository.cs @@ -113,6 +113,9 @@ namespace ErsatzTV.Infrastructure.Data.Repositories .Filter(ovm => ids.Contains(ovm.SongId)) .Include(ovm => ovm.Song) .Include(ovm => ovm.Artwork) + .Include(sm => sm.Song) + .ThenInclude(s => s.MediaVersions) + .ThenInclude(mv => mv.MediaFiles) .OrderBy(ovm => ovm.SortTitle) .ToListAsync(); }