diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index b4765759c..7bcd3db91 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -852,12 +852,12 @@ namespace MediaBrowser.Controller.Entities
throw new ArgumentNullException("user");
}
- if (string.IsNullOrEmpty(user.Configuration.MaxParentalRating))
+ if (user.Configuration.MaxParentalRating == null)
{
return true;
}
- return Ratings.Level(CustomRating ?? OfficialRating) <= Ratings.Level(user.Configuration.MaxParentalRating);
+ return Ratings.Level(CustomRating ?? OfficialRating) <= user.Configuration.MaxParentalRating.Value;
}
///
diff --git a/MediaBrowser.Model/Configuration/UserConfiguration.cs b/MediaBrowser.Model/Configuration/UserConfiguration.cs
index be784d1c6..deb6fdb3d 100644
--- a/MediaBrowser.Model/Configuration/UserConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/UserConfiguration.cs
@@ -10,7 +10,7 @@ namespace MediaBrowser.Model.Configuration
/// Gets or sets the max parental rating.
///
/// The max parental rating.
- public string MaxParentalRating { get; set; }
+ public int? MaxParentalRating { get; set; }
///
/// Gets or sets a value indicating whether [use custom library].