added critic rating interface

This commit is contained in:
Luke Pulverenti
2013-11-06 11:06:16 -05:00
parent 885287e631
commit a4cea5a5d3
12 changed files with 118 additions and 46 deletions

View File

@@ -581,7 +581,17 @@ namespace MediaBrowser.Api.UserLibrary
{
var val = request.MinCriticRating.Value;
items = items.Where(i => i.CriticRating.HasValue && i.CriticRating >= val);
items = items.Where(i =>
{
var hasCriticRating = i as IHasCriticRating;
if (hasCriticRating != null)
{
return hasCriticRating.CriticRating.HasValue && hasCriticRating.CriticRating >= val;
}
return false;
});
}
// Artists