From d2b4dd9a986276999540d6162d08a0973b3f6226 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 19 Aug 2015 00:08:03 -0400 Subject: [PATCH] update detail screens --- MediaBrowser.Api/UserLibrary/ItemsService.cs | 11 ++++++++++- .../MediaBrowser.WebDashboard.csproj | 3 --- 2 files changed, 10 insertions(+), 4 deletions(-) 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