add null check to omdb

This commit is contained in:
Luke Pulverenti 2016-10-22 10:51:19 -04:00
parent 63c6f85bd0
commit 8626eded8d

View File

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