From 81746666ded02f844605fb26bc1c0ac2dd650bb0 Mon Sep 17 00:00:00 2001 From: Shadowghost Date: Fri, 26 May 2023 10:59:49 +0200 Subject: Fix TotalRecordCount calculation --- Jellyfin.Api/Controllers/ItemsController.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Jellyfin.Api/Controllers/ItemsController.cs') diff --git a/Jellyfin.Api/Controllers/ItemsController.cs b/Jellyfin.Api/Controllers/ItemsController.cs index d4116116b..7650b861f 100644 --- a/Jellyfin.Api/Controllers/ItemsController.cs +++ b/Jellyfin.Api/Controllers/ItemsController.cs @@ -512,12 +512,10 @@ public class ItemsController : BaseJellyfinApiController result = new QueryResult(itemsArray); } - // result might include items not accessible by the user, DtoService will remove them - var accessibleItems = _dtoService.GetBaseItemDtos(result.Items, dtoOptions, user); return new QueryResult( startIndex, - accessibleItems.Count, - accessibleItems); + result.TotalRecordCount, + _dtoService.GetBaseItemDtos(result.Items, dtoOptions, user)); } /// -- cgit v1.2.3