diff --git a/CHANGELOG.md b/CHANGELOG.md index fc20ab2e7..c4af08eb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Added +- Add music video album to search index + - This requires rebuilding the search index and search results may be empty or incomplete until the rebuild is complete + ### Changed - Remove forced initial delay from `HLS Segmenter` streaming mode diff --git a/ErsatzTV.Application/MediaCards/Mapper.cs b/ErsatzTV.Application/MediaCards/Mapper.cs index 05b62d058..59d1bad41 100644 --- a/ErsatzTV.Application/MediaCards/Mapper.cs +++ b/ErsatzTV.Application/MediaCards/Mapper.cs @@ -1,5 +1,4 @@ -using System; -using System.Linq; +using System.Linq; using ErsatzTV.Core; using ErsatzTV.Core.Domain; using ErsatzTV.Core.Emby; @@ -101,6 +100,7 @@ namespace ErsatzTV.Application.MediaCards musicVideoMetadata.MusicVideo.Artist.ArtistMetadata.Head().Title, musicVideoMetadata.SortTitle, musicVideoMetadata.Plot, + musicVideoMetadata.Album, GetThumbnail(musicVideoMetadata, None, None)); internal static ArtistCardViewModel ProjectToViewModel(ArtistMetadata artistMetadata) => diff --git a/ErsatzTV.Application/MediaCards/MusicVideoCardViewModel.cs b/ErsatzTV.Application/MediaCards/MusicVideoCardViewModel.cs index 2f6f0a800..68ca03597 100644 --- a/ErsatzTV.Application/MediaCards/MusicVideoCardViewModel.cs +++ b/ErsatzTV.Application/MediaCards/MusicVideoCardViewModel.cs @@ -7,6 +7,7 @@ string Subtitle, string SortTitle, string Plot, + string Album, string Poster) : MediaCardViewModel( MusicVideoId, Title, diff --git a/ErsatzTV.Infrastructure/Search/SearchIndex.cs b/ErsatzTV.Infrastructure/Search/SearchIndex.cs index 3acf62f0a..1f607c377 100644 --- a/ErsatzTV.Infrastructure/Search/SearchIndex.cs +++ b/ErsatzTV.Infrastructure/Search/SearchIndex.cs @@ -52,6 +52,7 @@ namespace ErsatzTV.Infrastructure.Search private const string DirectorField = "director"; private const string WriterField = "writer"; private const string TraktListField = "trakt_list"; + private const string AlbumField = "album"; public const string MovieType = "movie"; public const string ShowType = "show"; @@ -74,7 +75,7 @@ namespace ErsatzTV.Infrastructure.Search _initialized = false; } - public int Version => 16; + public int Version => 17; public Task Initialize(ILocalFileSystem localFileSystem) { @@ -624,6 +625,11 @@ namespace ErsatzTV.Infrastructure.Search Field.Store.NO)); } + if (!string.IsNullOrWhiteSpace(metadata.Album)) + { + doc.Add(new TextField(AlbumField, metadata.Album, Field.Store.NO)); + } + if (!string.IsNullOrWhiteSpace(metadata.Plot)) { doc.Add(new TextField(PlotField, metadata.Plot ?? string.Empty, Field.Store.NO)); diff --git a/ErsatzTV/Pages/Artist.razor b/ErsatzTV/Pages/Artist.razor index 6dab1398b..d9cf3bfb7 100644 --- a/ErsatzTV/Pages/Artist.razor +++ b/ErsatzTV/Pages/Artist.razor @@ -139,6 +139,13 @@
@musicVideo.Title + @if (!string.IsNullOrWhiteSpace(musicVideo.Album)) + { +
+ Album:  + @musicVideo.Album +
+ } @musicVideo.Plot