search index fixes (#559)
* add music video artist to search index * properly index minutes field when adding from scan * bump search index version
This commit is contained in:
@@ -79,7 +79,7 @@ namespace ErsatzTV.Infrastructure.Search
|
||||
_initialized = false;
|
||||
}
|
||||
|
||||
public int Version => 18;
|
||||
public int Version => 19;
|
||||
|
||||
public Task<bool> Initialize(ILocalFileSystem localFileSystem)
|
||||
{
|
||||
@@ -675,6 +675,14 @@ namespace ErsatzTV.Infrastructure.Search
|
||||
{
|
||||
doc.Add(new TextField(StudioField, studio.Name, Field.Store.NO));
|
||||
}
|
||||
|
||||
if (musicVideo.Artist != null)
|
||||
{
|
||||
foreach (ArtistMetadata artistMetadata in musicVideo.Artist.ArtistMetadata)
|
||||
{
|
||||
doc.Add(new TextField(ArtistField, artistMetadata.Title, Field.Store.NO));
|
||||
}
|
||||
}
|
||||
|
||||
_writer.UpdateDocument(new Term(IdField, musicVideo.Id.ToString()), doc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user