Update TvdbSeasonImageProvider.cs

This commit is contained in:
shayaantx 2020-06-05 18:14:47 -04:00
parent 4623cb8385
commit 42bbfa772f

View File

@ -89,9 +89,8 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
private IEnumerable<RemoteImageInfo> GetImages(Image[] images, string preferredLanguage)
{
var list = new List<RemoteImageInfo>();
var languages = _tvdbClientManager.GetLanguagesAsync(CancellationToken.None).Result.Data;
// any languages with null ids are ignored
languages = Array.FindAll(languages, language => language.Id != null);
var languages = _tvdbClientManager.GetLanguagesAsync(CancellationToken.None).Result.Data.Where(x => x.Id.HasValue);
foreach (Image image in images)
{
var imageInfo = new RemoteImageInfo