diff options
| author | lostb1t <coding-mosses0z@icloud.com> | 2025-10-03 01:33:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-02 17:33:50 -0600 |
| commit | 97ec4c1da272b047d8076e871dd2ce5bc535d9d7 (patch) | |
| tree | ad9bee28719e30b0c036b40454db07d5e66f0fb2 /Jellyfin.Server.Implementations/Item | |
| parent | 894ba1a410a97a846b9d5f7167190a79337a3f67 (diff) | |
fix: get total count after grouping (#14931)
Diffstat (limited to 'Jellyfin.Server.Implementations/Item')
| -rw-r--r-- | Jellyfin.Server.Implementations/Item/BaseItemRepository.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs index aaff9e5d7..0884efa43 100644 --- a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs +++ b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs @@ -267,12 +267,13 @@ public sealed class BaseItemRepository IQueryable<BaseItemEntity> dbQuery = PrepareItemQuery(context, filter); dbQuery = TranslateQuery(dbQuery, context, filter); + dbQuery = ApplyGroupingFilter(context, dbQuery, filter); + if (filter.EnableTotalRecordCount) { result.TotalRecordCount = dbQuery.Count(); } - dbQuery = ApplyGroupingFilter(context, dbQuery, filter); dbQuery = ApplyQueryPaging(dbQuery, filter); result.Items = dbQuery.AsEnumerable().Where(e => e is not null).Select(w => DeserializeBaseItem(w, filter.SkipDeserialization)).ToArray(); |
