Browse Source

fix search index bug (#1231)

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

1
CHANGELOG.md

@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fix transcoding some 10-bit content from media servers using VAAPI acceleration - Fix transcoding some 10-bit content from media servers using VAAPI acceleration
- Fix decoding of MPEG-4 Part 2 (e.g. DivX) content using NVIDIA acceleration - Fix decoding of MPEG-4 Part 2 (e.g. DivX) content using NVIDIA acceleration
- Fix color normalization from `bt470bg` to `bt709` using QSV acceleration - Fix color normalization from `bt470bg` to `bt709` using QSV acceleration
- Fix adding files to search index with unknown video codec
### Changed ### Changed
- Use Poster artwork for XMLTV if available - Use Poster artwork for XMLTV if available

7
ErsatzTV.Infrastructure/Search/SearchIndex.cs

@ -96,7 +96,7 @@ public sealed class SearchIndex : ISearchIndex
_initialized = false; _initialized = false;
} }
public int Version => 34; public int Version => 35;
public async Task<bool> Initialize( public async Task<bool> Initialize(
ILocalFileSystem localFileSystem, ILocalFileSystem localFileSystem,
@ -1154,7 +1154,10 @@ public sealed class SearchIndex : ISearchIndex
foreach (MediaStream videoStream in version.Streams.Filter(s => s.MediaStreamKind == MediaStreamKind.Video)) foreach (MediaStream videoStream in version.Streams.Filter(s => s.MediaStreamKind == MediaStreamKind.Video))
{ {
doc.Add(new StringField(VideoCodecField, videoStream.Codec, Field.Store.NO)); if (!string.IsNullOrWhiteSpace(videoStream.Codec))
{
doc.Add(new StringField(VideoCodecField, videoStream.Codec, Field.Store.NO));
}
Option<IPixelFormat> maybePixelFormat = Option<IPixelFormat> maybePixelFormat =
AvailablePixelFormats.ForPixelFormat(videoStream.PixelFormat, null); AvailablePixelFormats.ForPixelFormat(videoStream.PixelFormat, null);

Loading…
Cancel
Save