diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs index b412a6480..7d3290c2f 100644 --- a/MediaBrowser.Api/UserLibrary/ItemsService.cs +++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs @@ -117,7 +117,16 @@ namespace MediaBrowser.Api.UserLibrary if (!string.IsNullOrEmpty(request.Ids)) { request.Recursive = true; - var result = await ((Folder)item).GetItems(GetItemsQuery(request, user)).ConfigureAwait(false); + var query = GetItemsQuery(request, user); + var result = await ((Folder)item).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 new Tuple, bool>(result, true); } diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj index 412bb4742..8f8249868 100644 --- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj +++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj @@ -1938,9 +1938,6 @@ - - PreserveNewest - PreserveNewest