diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index 1d803ea45..b4765759c 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -849,10 +849,15 @@ namespace MediaBrowser.Controller.Entities
{
if (user == null)
{
- throw new ArgumentNullException();
+ throw new ArgumentNullException("user");
}
- return user.Configuration.MaxParentalRating == null || Ratings.Level(CustomRating ?? OfficialRating) <= user.Configuration.MaxParentalRating;
+ if (string.IsNullOrEmpty(user.Configuration.MaxParentalRating))
+ {
+ return true;
+ }
+
+ return Ratings.Level(CustomRating ?? OfficialRating) <= Ratings.Level(user.Configuration.MaxParentalRating);
}
///
diff --git a/MediaBrowser.Controller/Localization/Ratings.cs b/MediaBrowser.Controller/Localization/Ratings.cs
index 44bbb3d00..bc4ebab4e 100644
--- a/MediaBrowser.Controller/Localization/Ratings.cs
+++ b/MediaBrowser.Controller/Localization/Ratings.cs
@@ -1,4 +1,5 @@
-using MediaBrowser.Controller.Configuration;
+using System.Globalization;
+using MediaBrowser.Controller.Configuration;
using System.Collections.Generic;
using System.IO;
using System.Linq;
diff --git a/MediaBrowser.Model/Configuration/UserConfiguration.cs b/MediaBrowser.Model/Configuration/UserConfiguration.cs
index deb6fdb3d..be784d1c6 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 int? MaxParentalRating { get; set; }
+ public string MaxParentalRating { get; set; }
///
/// Gets or sets a value indicating whether [use custom library].