Merge pull request #3250 from shayaantx/master
Ignore languages with null ids when fetching images from tvdb
This commit is contained in:
commit
686066b134
|
@ -20,7 +20,7 @@
|
|||
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="3.1.4" />
|
||||
<PackageReference Include="OptimizedPriorityQueue" Version="4.2.0" />
|
||||
<PackageReference Include="PlaylistsNET" Version="1.0.4" />
|
||||
<PackageReference Include="TvDbSharper" Version="3.0.1" />
|
||||
<PackageReference Include="TvDbSharper" Version="3.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
|
|
@ -89,7 +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
|
||||
var languages = _tvdbClientManager.GetLanguagesAsync(CancellationToken.None).Result.Data.Where(x => x.Id.HasValue);
|
||||
foreach (Image image in images)
|
||||
{
|
||||
var imageInfo = new RemoteImageInfo
|
||||
|
|
Loading…
Reference in New Issue
Block a user