diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-08-18 11:13:18 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-08-18 11:13:18 -0400 |
| commit | 845c4a0d62e05b89d0a8bc3900b54e3c2cb75168 (patch) | |
| tree | 2bd865ac971f73181eee80af05409369623dc216 /MediaBrowser.Api/UserLibrary/ItemsService.cs | |
| parent | 389487638ec358c975f7573c8b6132525f3925ab (diff) | |
update item by name validators
Diffstat (limited to 'MediaBrowser.Api/UserLibrary/ItemsService.cs')
| -rw-r--r-- | MediaBrowser.Api/UserLibrary/ItemsService.cs | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs index 97a81b790..9194cdb35 100644 --- a/MediaBrowser.Api/UserLibrary/ItemsService.cs +++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs @@ -157,24 +157,7 @@ namespace MediaBrowser.Api.UserLibrary folder = user == null ? _libraryManager.RootFolder : _libraryManager.GetUserRootFolder(); } - if (!string.IsNullOrEmpty(request.Ids)) - { - request.Recursive = true; - var query = GetItemsQuery(request, user); - var result = await folder.GetItems(query).ConfigureAwait(false); - - if (string.IsNullOrWhiteSpace(request.SortBy)) - { - var ids = query.ItemIds.ToList(); - - // Try to preserve order - result.Items = result.Items.OrderBy(i => ids.IndexOf(i.Id.ToString("N"))).ToArray(); - } - - return result; - } - - if (request.Recursive) + if (request.Recursive || !string.IsNullOrEmpty(request.Ids)) { return await folder.GetItems(GetItemsQuery(request, user)).ConfigureAwait(false); } |
