mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 11:34:57 +02:00
handle empty fields result
This commit is contained in:
parent
4e81655239
commit
fda8c64f9c
1 changed files with 4 additions and 2 deletions
|
@ -235,8 +235,10 @@ namespace MediaBrowser.Providers.Subtitles
|
||||||
Predicate<SubtitleSearchResult> mediaFilter =
|
Predicate<SubtitleSearchResult> mediaFilter =
|
||||||
x =>
|
x =>
|
||||||
request.ContentType == SubtitleMediaType.Episode
|
request.ContentType == SubtitleMediaType.Episode
|
||||||
? int.Parse(x.SeriesSeason, _usCulture) == request.ParentIndexNumber && int.Parse(x.SeriesEpisode, _usCulture) == request.IndexNumber
|
? !string.IsNullOrEmpty(x.SeriesSeason) && !string.IsNullOrEmpty(x.SeriesEpisode) &&
|
||||||
: long.Parse(x.IDMovieImdb, _usCulture) == imdbId;
|
int.Parse(x.SeriesSeason, _usCulture) == request.ParentIndexNumber &&
|
||||||
|
int.Parse(x.SeriesEpisode, _usCulture) == request.IndexNumber
|
||||||
|
: !string.IsNullOrEmpty(x.IDMovieImdb) && long.Parse(x.IDMovieImdb, _usCulture) == imdbId;
|
||||||
|
|
||||||
var results = ((MethodResponseSubtitleSearch)result).Results;
|
var results = ((MethodResponseSubtitleSearch)result).Results;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue