diff options
| author | Carey Metcalfe <carey@cmetcalfe.ca> | 2020-01-24 00:43:28 -0500 |
|---|---|---|
| committer | Carey Metcalfe <carey@cmetcalfe.ca> | 2020-01-24 00:43:28 -0500 |
| commit | d3de91dab67bbe7770bf74e97699b966f30822c9 (patch) | |
| tree | 2f19c4d7d8d7fe0f8ab230c43bae1729ecca2990 | |
| parent | 8ff07e17e6f58a1102b9d8c36a995dec4dc2f041 (diff) | |
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
| -rw-r--r-- | MediaBrowser.Controller/Entities/UserRootFolder.cs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/MediaBrowser.Controller/Entities/UserRootFolder.cs b/MediaBrowser.Controller/Entities/UserRootFolder.cs index 7fcf48a48..8a68f830c 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<BaseItem> - { - 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) |
