#182 - Eliminate duplicates in the selection list for max rating in user screen
This commit is contained in:
parent
4c69edebe0
commit
6ef9fd9513
|
@ -852,12 +852,12 @@ namespace MediaBrowser.Controller.Entities
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException("user");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(user.Configuration.MaxParentalRating))
|
if (user.Configuration.MaxParentalRating == null)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Ratings.Level(CustomRating ?? OfficialRating) <= Ratings.Level(user.Configuration.MaxParentalRating);
|
return Ratings.Level(CustomRating ?? OfficialRating) <= user.Configuration.MaxParentalRating.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace MediaBrowser.Model.Configuration
|
||||||
/// Gets or sets the max parental rating.
|
/// Gets or sets the max parental rating.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The max parental rating.</value>
|
/// <value>The max parental rating.</value>
|
||||||
public string MaxParentalRating { get; set; }
|
public int? MaxParentalRating { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether [use custom library].
|
/// Gets or sets a value indicating whether [use custom library].
|
||||||
|
|
Loading…
Reference in New Issue
Block a user