Merge pull request #5881 from cvium/tmdb-episode-externalids

Add tvrage and imdb ids for episodes
pull/5886/head
Bond-009 4 years ago committed by GitHub
commit e19d89bb4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -121,9 +121,20 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
CommunityRating = Convert.ToSingle(episodeResult.VoteAverage)
};
if (!string.IsNullOrEmpty(episodeResult.ExternalIds?.TvdbId))
var externalIds = episodeResult.ExternalIds;
if (!string.IsNullOrEmpty(externalIds?.TvdbId))
{
item.SetProviderId(MetadataProvider.Tvdb, episodeResult.ExternalIds.TvdbId);
item.SetProviderId(MetadataProvider.Tvdb, externalIds.TvdbId);
}
if (!string.IsNullOrEmpty(externalIds?.ImdbId))
{
item.SetProviderId(MetadataProvider.Imdb, externalIds.ImdbId);
}
if (!string.IsNullOrEmpty(externalIds?.TvrageId))
{
item.SetProviderId(MetadataProvider.TvRage, externalIds.TvrageId);
}
if (episodeResult.Videos?.Results != null)

Loading…
Cancel
Save