diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-04-22 12:04:54 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-04-22 12:04:54 -0400 |
| commit | 6ef9fd9513317df45d05d4eb607559b7ef1ff995 (patch) | |
| tree | 4a8b549e76d2321e3e0189ccb0dca33dea77c32a | |
| parent | 4c69edebe048433977304241e3dbfb9e8a2ab968 (diff) | |
#182 - Eliminate duplicates in the selection list for max rating in user screen
| -rw-r--r-- | MediaBrowser.Controller/Entities/BaseItem.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Model/Configuration/UserConfiguration.cs | 2 |
2 files changed, 3 insertions, 3 deletions
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; } /// <summary> 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. /// </summary> /// <value>The max parental rating.</value> - public string MaxParentalRating { get; set; } + public int? MaxParentalRating { get; set; } /// <summary> /// Gets or sets a value indicating whether [use custom library]. |
