mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-07 13:45:10 -05:00
fix: get total count after grouping (#14931)
This commit is contained in:
parent
894ba1a410
commit
97ec4c1da2
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user