diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-12-05 22:39:44 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-12-05 22:39:44 -0500 |
| commit | 5f0d8000a5ec26fd66c5f188f3bb517bb139b74b (patch) | |
| tree | 769514a446fc33ba812d1a9a05a66f0845c9e590 /MediaBrowser.Api/UserLibrary/ItemsService.cs | |
| parent | ebe483db9a5d31528a644200a71f2b36ac2864bd (diff) | |
moved media streams to the database
Diffstat (limited to 'MediaBrowser.Api/UserLibrary/ItemsService.cs')
| -rw-r--r-- | MediaBrowser.Api/UserLibrary/ItemsService.cs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs index 7cb624af8..380e09463 100644 --- a/MediaBrowser.Api/UserLibrary/ItemsService.cs +++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs @@ -226,7 +226,7 @@ namespace MediaBrowser.Api.UserLibrary [ApiMember(Name = "HasTvdbId", Description = "Optional filter by items that have a tvdb id or not.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")] public bool? HasTvdbId { get; set; } - + [ApiMember(Name = "IsYearMismatched", Description = "Optional filter by items that are potentially misidentified.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")] public bool? IsYearMismatched { get; set; } } @@ -984,15 +984,9 @@ namespace MediaBrowser.Api.UserLibrary if (request.HasSubtitles.HasValue) { - items = items.OfType<Video>().Where(i => - { - if (request.HasSubtitles.Value) - { - return i.MediaStreams != null && i.MediaStreams.Any(m => m.Type == MediaStreamType.Subtitle); - } + var val = request.HasSubtitles.Value; - return i.MediaStreams == null || i.MediaStreams.All(m => m.Type != MediaStreamType.Subtitle); - }); + items = items.OfType<Video>().Where(i => val == i.HasSubtitles); } if (request.HasParentalRating.HasValue) |
