add null check to omdb

This commit is contained in:
Luke Pulverenti 2016-10-22 10:51:19 -04:00
parent 3768de3a32
commit aa36fc0e6f

View File

@ -124,7 +124,12 @@ namespace MediaBrowser.Providers.Omdb
T item = itemResult.Item;
var seasonResult = await GetSeasonRootObject(imdbId, seasonNumber, cancellationToken);
var seasonResult = await GetSeasonRootObject(imdbId, seasonNumber, cancellationToken).ConfigureAwait(false);
if (seasonResult == null)
{
return false;
}
RootObject result = null;
@ -142,7 +147,6 @@ namespace MediaBrowser.Providers.Omdb
return false;
}
// Only take the name and rating if the user's language is set to english, since Omdb has no localization
if (string.Equals(language, "en", StringComparison.OrdinalIgnoreCase))
{