From 2cfc77dc03a458b313a3281525feceea3338e5ae Mon Sep 17 00:00:00 2001 From: Eric Reed Date: Wed, 5 Jun 2013 14:15:10 -0400 Subject: [PATCH] No ratings are reported as empty string not null --- MediaBrowser.Controller/Providers/Movies/MovieDbProvider.cs | 2 +- MediaBrowser.sln | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/MediaBrowser.Controller/Providers/Movies/MovieDbProvider.cs b/MediaBrowser.Controller/Providers/Movies/MovieDbProvider.cs index 091ce7c63..6a9806d84 100644 --- a/MediaBrowser.Controller/Providers/Movies/MovieDbProvider.cs +++ b/MediaBrowser.Controller/Providers/Movies/MovieDbProvider.cs @@ -775,7 +775,7 @@ namespace MediaBrowser.Controller.Providers.Movies var ourRelease = movieData.releases.countries.FirstOrDefault(c => c.iso_3166_1.Equals(ConfigurationManager.Configuration.MetadataCountryCode, StringComparison.OrdinalIgnoreCase)) ?? new Country(); var usRelease = movieData.releases.countries.FirstOrDefault(c => c.iso_3166_1.Equals("US", StringComparison.OrdinalIgnoreCase)) ?? new Country(); var ratingPrefix = ConfigurationManager.Configuration.MetadataCountryCode.Equals("us", StringComparison.OrdinalIgnoreCase) ? "" : ConfigurationManager.Configuration.MetadataCountryCode +"-"; - movie.OfficialRating = ourRelease.certification != null ? ratingPrefix + ourRelease.certification : usRelease.certification; + movie.OfficialRating = !string.IsNullOrEmpty(ourRelease.certification) ? ratingPrefix + ourRelease.certification : !string.IsNullOrEmpty(usRelease.certification) ? usRelease.certification : null; if (ourRelease.release_date > new DateTime(1900, 1, 1)) { diff --git a/MediaBrowser.sln b/MediaBrowser.sln index 86624423e..ea09b3fae 100644 --- a/MediaBrowser.sln +++ b/MediaBrowser.sln @@ -205,7 +205,4 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(Performance) = preSolution - HasPerformanceSessions = true - EndGlobalSection EndGlobal