improve moviedb null handling
This commit is contained in:
parent
55a53cfab7
commit
1454e07c54
|
@ -194,8 +194,8 @@ namespace MediaBrowser.Providers.Movies
|
|||
{
|
||||
var releases = movieData.releases.countries.Where(i => !string.IsNullOrWhiteSpace(i.certification)).ToList();
|
||||
|
||||
var ourRelease = releases.FirstOrDefault(c => c.iso_3166_1.Equals(preferredCountryCode, StringComparison.OrdinalIgnoreCase));
|
||||
var usRelease = releases.FirstOrDefault(c => c.iso_3166_1.Equals("US", StringComparison.OrdinalIgnoreCase));
|
||||
var ourRelease = releases.FirstOrDefault(c => string.Equals(c.iso_3166_1, preferredCountryCode, StringComparison.OrdinalIgnoreCase));
|
||||
var usRelease = releases.FirstOrDefault(c => string.Equals(c.iso_3166_1, "US", StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
if (ourRelease != null)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user