#182 - Eliminate duplicates in the selection list for max rating in user screen

This commit is contained in:
Luke Pulverenti
2013-04-22 11:38:38 -04:00
parent a55999b780
commit 47d2a11bdf
3 changed files with 10 additions and 4 deletions

View File

@@ -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);
}
/// <summary>