Browse Source

fix search result filtering for episodes and other videos (#900)

pull/901/head
Jason Dove 3 years ago committed by GitHub
parent
commit
5e7e386108
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      CHANGELOG.md
  2. 6
      ErsatzTV.Infrastructure/Search/SearchIndex.cs

2
CHANGELOG.md

@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). @@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fix subtitle stream selection when subtitle language is different than audio language
- Fix bug with unsupported AAC channel layouts
- Fix NVIDIA second-gen maxwell capabilities detection
- Return distinct search results for episodes and other videos that have the same title
- For example, two other videos both named `Trailer` would previously have displayed as one item in search results
### Added
- Add `640x480` resolution

6
ErsatzTV.Infrastructure/Search/SearchIndex.cs

@ -89,7 +89,7 @@ public sealed class SearchIndex : ISearchIndex @@ -89,7 +89,7 @@ public sealed class SearchIndex : ISearchIndex
_initialized = false;
}
public int Version => 29;
public int Version => 30;
public async Task<bool> Initialize(
ILocalFileSystem localFileSystem,
@ -1142,9 +1142,9 @@ public sealed class SearchIndex : ISearchIndex @@ -1142,9 +1142,9 @@ public sealed class SearchIndex : ISearchIndex
metadata switch
{
EpisodeMetadata em =>
$"{em.Title}_{em.Year}_{em.Episode.Season.SeasonNumber}_{em.EpisodeNumber}_{em.Episode.State}"
$"{em.Title}_{em.Episode.Season.Show.ShowMetadata.Head().Title}_{em.Year}_{em.Episode.Season.SeasonNumber}_{em.EpisodeNumber}_{em.Episode.State}"
.ToLowerInvariant(),
OtherVideoMetadata ovm => $"{ovm.Title}_{ovm.Year}_{ovm.OtherVideo.State}".ToLowerInvariant(),
OtherVideoMetadata ovm => $"{ovm.OriginalTitle}_{ovm.Year}_{ovm.OtherVideo.State}".ToLowerInvariant(),
SongMetadata sm => $"{sm.Title}_{sm.Year}_{sm.Song.State}".ToLowerInvariant(),
MovieMetadata mm => $"{mm.Title}_{mm.Year}_{mm.Movie.State}".ToLowerInvariant(),
ArtistMetadata am => $"{am.Title}_{am.Year}_{am.Artist.State}".ToLowerInvariant(),

Loading…
Cancel
Save