aboutsummaryrefslogtreecommitdiff
path: root/Emby.Dlna/ContentDirectory/ControlHandler.cs
diff options
context:
space:
mode:
authorCarey Metcalfe <carey@cmetcalfe.ca>2020-01-19 00:51:02 -0500
committerCarey Metcalfe <carey@cmetcalfe.ca>2020-01-19 01:37:52 -0500
commitf2eea89ff084111a4a90bfefdb6def68165e6025 (patch)
tree3b2462a01ef269be88189df0e476c01566317dc3 /Emby.Dlna/ContentDirectory/ControlHandler.cs
parentc618f3f8eb4ab58004dea94cd475438e555ce461 (diff)
Fix pagination for DLNA root folder list
Previously, when responding to a DLNA "Browse" request, the `StartingIndex` was not respected and all of the root items were returned each time. This caused infinite loops with in DLNA clients that ignored the `TotalMatches` data in the response and just continued asking for the next page until they got an empty response. This fix makes the root folder list respect the `StartingIndex` and `RequestedCount` parameters like all other responses. Fixes issue #2303
Diffstat (limited to 'Emby.Dlna/ContentDirectory/ControlHandler.cs')
-rw-r--r--Emby.Dlna/ContentDirectory/ControlHandler.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Emby.Dlna/ContentDirectory/ControlHandler.cs b/Emby.Dlna/ContentDirectory/ControlHandler.cs
index 4f74bb222..2068e1d2a 100644
--- a/Emby.Dlna/ContentDirectory/ControlHandler.cs
+++ b/Emby.Dlna/ContentDirectory/ControlHandler.cs
@@ -771,11 +771,11 @@ namespace Emby.Dlna.ContentDirectory
})
.ToArray();
- return new QueryResult<ServerItem>
+ return ApplyPaging(new QueryResult<ServerItem>
{
Items = folders,
TotalRecordCount = folders.Length
- };
+ }, startIndex, limit);
}
private QueryResult<ServerItem> GetTvFolders(BaseItem item, User user, StubType? stubType, SortCriteria sort, int? startIndex, int? limit)