add music video album to search index (#409)

* add music video album to search index

* update search docs
This commit is contained in:
Jason Dove
2021-10-10 10:28:35 -05:00
committed by GitHub
parent 742ac21ad7
commit d7d3ec1235
6 changed files with 22 additions and 3 deletions
+4
View File
@@ -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
+2 -2
View File
@@ -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) =>
@@ -7,6 +7,7 @@
string Subtitle,
string SortTitle,
string Plot,
string Album,
string Poster) : MediaCardViewModel(
MusicVideoId,
Title,
@@ -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<bool> 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));
+7
View File
@@ -139,6 +139,13 @@
<MudCardContent Class="ml-3">
<div style="display: flex; flex-direction: column; height: 100%">
<MudText Typo="Typo.h4">@musicVideo.Title</MudText>
@if (!string.IsNullOrWhiteSpace(musicVideo.Album))
{
<div style="display: flex; flex-direction: row">
<MudText GutterBottom="true">Album:&nbsp;</MudText>
<MudLink Href="@(@$"album:""{musicVideo.Album}""".GetRelativeSearchQuery())">@musicVideo.Album</MudLink>
</div>
}
<MudText Style="flex-grow: 1">@musicVideo.Plot</MudText>
<div class="mt-6">
<MudButton Variant="Variant.Filled"
+1
View File
@@ -71,6 +71,7 @@ The following fields are available for searching artists:
The following fields are available for searching music videos:
- `title`: The music video title
- `album`: The music video album
- `genre`: The music video genre
- `library_name`: The name of the library that contains the music video
- `language`: The music video audio stream language