From d3de91dab67bbe7770bf74e97699b966f30822c9 Mon Sep 17 00:00:00 2001 From: Carey Metcalfe Date: Fri, 24 Jan 2020 00:43:28 -0500 Subject: [PATCH] Fix another issue with DLNA responses not properly paginating The `UserRootFolder.GetItemsInternal` method now applies any sorting and pagination requested by the `InternalItemsQuery` that was passed to it. Previous pagination fix: #2304 Original issue #2303 --- MediaBrowser.Controller/Entities/UserRootFolder.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/MediaBrowser.Controller/Entities/UserRootFolder.cs b/MediaBrowser.Controller/Entities/UserRootFolder.cs index 7fcf48a48f..8a68f830cc 100644 --- a/MediaBrowser.Controller/Entities/UserRootFolder.cs +++ b/MediaBrowser.Controller/Entities/UserRootFolder.cs @@ -60,14 +60,7 @@ namespace MediaBrowser.Controller.Entities PresetViews = query.PresetViews }); - var itemsArray = result; - var totalCount = itemsArray.Length; - - return new QueryResult - { - TotalRecordCount = totalCount, - Items = itemsArray //TODO Fix The co-variant conversion between Folder[] and BaseItem[], this can generate runtime issues. - }; + return UserViewBuilder.SortAndPage(result, null, query, LibraryManager, true); } public override int GetChildCount(User user)