diff --git a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs index 19a7933b78..e9de363281 100644 --- a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs +++ b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs @@ -940,7 +940,7 @@ public sealed class BaseItemRepository( var result = new QueryResult<(BaseItemDto, ItemCounts)>(); if (filter.EnableTotalRecordCount) { - result.TotalRecordCount = query.DistinctBy(e => e.PresentationUniqueKey).Count(); + result.TotalRecordCount = query.GroupBy(e => e.PresentationUniqueKey).Select(e => e.First()).Count(); } var seriesTypeName = itemTypeLookup.BaseItemKindNames[BaseItemKind.Series];