fix movie db season retrieval

This commit is contained in:
Luke Pulverenti 2014-12-20 13:58:55 -05:00
parent c4e2158145
commit 34be2effa1

View File

@ -52,18 +52,18 @@ namespace MediaBrowser.Providers.TV
if (!string.IsNullOrWhiteSpace(seriesTmdbId) && seasonNumber.HasValue)
{
result.HasMetadata = true;
result.Item = new Season();
try
{
var seasonInfo = await GetSeasonInfo(seriesTmdbId, seasonNumber.Value, info.MetadataLanguage, cancellationToken)
.ConfigureAwait(false);
result.HasMetadata = true;
result.Item = new Season();
result.Item.Name = info.Name;
result.Item.Overview = seasonInfo.overview;
result.Item.IndexNumber = seasonNumber;
result.Item.Overview = seasonInfo.overview;
if (seasonInfo.external_ids.tvdb_id > 0)
{
result.Item.SetProviderId(MetadataProviders.Tvdb, seasonInfo.external_ids.tvdb_id.ToString(CultureInfo.InvariantCulture));