diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-05-06 15:58:38 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-06 15:58:38 -0400 |
| commit | e42ef5c1817fb500b14c2eac4aa0ed765a6c6e64 (patch) | |
| tree | 6beddce4dffa97eb199da99867f6b493ce197e64 /MediaBrowser.Api/UserLibrary/ItemsService.cs | |
| parent | b0dd8c1b7542e0a7c0d58fa5bdca4e69ca174746 (diff) | |
| parent | 4764e3924773546d8db8c805d05990bbbfe44a7e (diff) | |
Merge pull request #2615 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Api/UserLibrary/ItemsService.cs')
| -rw-r--r-- | MediaBrowser.Api/UserLibrary/ItemsService.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs index 5d267d059..f8580d328 100644 --- a/MediaBrowser.Api/UserLibrary/ItemsService.cs +++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs @@ -328,7 +328,15 @@ namespace MediaBrowser.Api.UserLibrary if (!string.IsNullOrEmpty(request.LocationTypes)) { - query.LocationTypes = request.LocationTypes.Split(',').Select(d => (LocationType)Enum.Parse(typeof(LocationType), d, true)).ToArray(); + var requestedLocationTypes = + request.LocationTypes.Split(',') + .Select(d => (LocationType) Enum.Parse(typeof (LocationType), d, true)) + .ToList(); + + if (requestedLocationTypes.Count > 0 && requestedLocationTypes.Count < 4) + { + query.IsVirtualItem = requestedLocationTypes.Contains(LocationType.Virtual); + } } // Min official rating |
