From 47d2a11bdf9ea49c64ab8c49d2644d02b7747369 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 22 Apr 2013 11:38:38 -0400 Subject: #182 - Eliminate duplicates in the selection list for max rating in user screen --- MediaBrowser.Controller/Entities/BaseItem.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'MediaBrowser.Controller/Entities/BaseItem.cs') 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"); + } + + if (string.IsNullOrEmpty(user.Configuration.MaxParentalRating)) + { + return true; } - return user.Configuration.MaxParentalRating == null || Ratings.Level(CustomRating ?? OfficialRating) <= user.Configuration.MaxParentalRating; + return Ratings.Level(CustomRating ?? OfficialRating) <= Ratings.Level(user.Configuration.MaxParentalRating); } /// -- cgit v1.2.3