mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Removed grouping key for testing
This commit is contained in:
parent
b6177363e9
commit
17e4485b94
@ -240,24 +240,29 @@ public sealed class BaseItemRepository(
|
|||||||
|
|
||||||
private IQueryable<BaseItemEntity> ApplyGroupingFilter(IQueryable<BaseItemEntity> dbQuery, InternalItemsQuery filter)
|
private IQueryable<BaseItemEntity> ApplyGroupingFilter(IQueryable<BaseItemEntity> dbQuery, InternalItemsQuery filter)
|
||||||
{
|
{
|
||||||
var enableGroupByPresentationUniqueKey = EnableGroupByPresentationUniqueKey(filter);
|
// var enableGroupByPresentationUniqueKey = EnableGroupByPresentationUniqueKey(filter);
|
||||||
if (enableGroupByPresentationUniqueKey && filter.GroupBySeriesPresentationUniqueKey)
|
// if (enableGroupByPresentationUniqueKey && filter.GroupBySeriesPresentationUniqueKey)
|
||||||
{
|
// {
|
||||||
dbQuery = dbQuery.GroupBy(e => new { e.PresentationUniqueKey, e.SeriesPresentationUniqueKey }).Select(e => e.First());
|
// dbQuery = ApplyOrder(dbQuery, filter);
|
||||||
}
|
// dbQuery = dbQuery.GroupBy(e => new { e.PresentationUniqueKey, e.SeriesPresentationUniqueKey }).Select(e => e.First());
|
||||||
else if (enableGroupByPresentationUniqueKey)
|
// }
|
||||||
{
|
// else if (enableGroupByPresentationUniqueKey)
|
||||||
dbQuery = dbQuery.GroupBy(e => e.PresentationUniqueKey).Select(e => e.First());
|
// {
|
||||||
}
|
// dbQuery = ApplyOrder(dbQuery, filter);
|
||||||
else if (filter.GroupBySeriesPresentationUniqueKey)
|
// dbQuery = dbQuery.GroupBy(e => e.PresentationUniqueKey).Select(e => e.First());
|
||||||
{
|
// }
|
||||||
dbQuery = dbQuery.GroupBy(e => e.SeriesPresentationUniqueKey).Select(e => e.First());
|
// else if (filter.GroupBySeriesPresentationUniqueKey)
|
||||||
}
|
// {
|
||||||
else
|
// dbQuery = ApplyOrder(dbQuery, filter);
|
||||||
{
|
// dbQuery = dbQuery.GroupBy(e => e.SeriesPresentationUniqueKey).Select(e => e.First());
|
||||||
dbQuery = dbQuery.Distinct();
|
// }
|
||||||
dbQuery = ApplyOrder(dbQuery, filter);
|
// else
|
||||||
}
|
// {
|
||||||
|
// dbQuery = dbQuery.Distinct();
|
||||||
|
// dbQuery = ApplyOrder(dbQuery, filter);
|
||||||
|
// }
|
||||||
|
dbQuery = dbQuery.Distinct();
|
||||||
|
dbQuery = ApplyOrder(dbQuery, filter);
|
||||||
|
|
||||||
return dbQuery;
|
return dbQuery;
|
||||||
}
|
}
|
||||||
@ -293,7 +298,7 @@ public sealed class BaseItemRepository(
|
|||||||
|
|
||||||
private IQueryable<BaseItemEntity> PrepareItemQuery(JellyfinDbContext context, InternalItemsQuery filter)
|
private IQueryable<BaseItemEntity> PrepareItemQuery(JellyfinDbContext context, InternalItemsQuery filter)
|
||||||
{
|
{
|
||||||
IQueryable<BaseItemEntity> dbQuery = context.BaseItems.AsNoTracking().AsSingleQuery()
|
IQueryable<BaseItemEntity> dbQuery = context.BaseItems.AsNoTracking().AsSplitQuery()
|
||||||
.Include(e => e.TrailerTypes)
|
.Include(e => e.TrailerTypes)
|
||||||
.Include(e => e.Provider)
|
.Include(e => e.Provider)
|
||||||
.Include(e => e.LockedFields);
|
.Include(e => e.LockedFields);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user