diff options
| author | Eric Reed <ebr@mediabrowser3.com> | 2013-11-07 12:27:21 -0500 |
|---|---|---|
| committer | Eric Reed <ebr@mediabrowser3.com> | 2013-11-07 12:27:21 -0500 |
| commit | bda3a301e70b8cdca8af06e6395701ec98a89e09 (patch) | |
| tree | c32ec5d48a48a64bb9e06dd827da9fbc04ce6406 /MediaBrowser.Api/UserLibrary/ItemsService.cs | |
| parent | 63554bde5be929588e9073415ea811170264508b (diff) | |
| parent | 01f1ed05b9a401939ccbd586e07951c144232608 (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Diffstat (limited to 'MediaBrowser.Api/UserLibrary/ItemsService.cs')
| -rw-r--r-- | MediaBrowser.Api/UserLibrary/ItemsService.cs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs index 29a894b1c..9547cc0a4 100644 --- a/MediaBrowser.Api/UserLibrary/ItemsService.cs +++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs @@ -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 |
