update db querying

This commit is contained in:
Luke Pulverenti
2016-03-20 23:10:37 -04:00
parent 52a42229cd
commit d4870e788a
5 changed files with 31 additions and 119 deletions

View File

@@ -2062,6 +2062,12 @@ namespace MediaBrowser.Server.Implementations.Persistence
whereClauses.Add(clause);
}
if (query.MinParentalRating.HasValue)
{
whereClauses.Add("InheritedParentalRatingValue<=@MinParentalRating");
cmd.Parameters.Add(cmd, "@MinParentalRating", DbType.Int32).Value = query.MinParentalRating.Value;
}
if (query.MaxParentalRating.HasValue)
{
whereClauses.Add("InheritedParentalRatingValue<=@MaxParentalRating");