add null check to omdb

pull/702/head
Luke Pulverenti 8 years ago
parent 3768de3a32
commit aa36fc0e6f

@ -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))
{ {

Loading…
Cancel
Save