diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-04-22 11:38:38 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-04-22 11:38:38 -0400 |
| commit | 47d2a11bdf9ea49c64ab8c49d2644d02b7747369 (patch) | |
| tree | b3ab3656bc476db01230cac9ebf380ca64c5e8cc /MediaBrowser.Controller/Entities/BaseItem.cs | |
| parent | a55999b780367dfa344bb0dfc754b5172b0b195a (diff) | |
#182 - Eliminate duplicates in the selection list for max rating in user screen
Diffstat (limited to 'MediaBrowser.Controller/Entities/BaseItem.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/BaseItem.cs | 9 |
1 files changed, 7 insertions, 2 deletions
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); } /// <summary> |
