Fixed Library DB lookup

This commit is contained in:
JPVenson
2024-11-11 06:14:08 +00:00
parent 8dbbb3e243
commit fb48d0790f
2 changed files with 7 additions and 2 deletions

View File

@@ -261,7 +261,12 @@ public sealed class BaseItemRepository(
PrepareFilterQuery(filter);
using var context = dbProvider.CreateDbContext();
var dbQuery = TranslateQuery(context.BaseItems.AsNoTracking(), context, filter);
IQueryable<BaseItemEntity> dbQuery = context.BaseItems.AsNoTracking()
.Include(e => e.TrailerTypes)
.Include(e => e.Provider)
.Include(e => e.Images)
.Include(e => e.LockedFields);
dbQuery = TranslateQuery(dbQuery, context, filter);
if (filter.Limit.HasValue || filter.StartIndex.HasValue)
{
var offset = filter.StartIndex ?? 0;