diff options
Diffstat (limited to 'Jellyfin.Server.Implementations/Item/BaseItemRepository.cs')
| -rw-r--r-- | Jellyfin.Server.Implementations/Item/BaseItemRepository.cs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs index b367cb9f7..3d377d0d9 100644 --- a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs +++ b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs @@ -1339,11 +1339,13 @@ public sealed class BaseItemRepository( } using var context = dbProvider.CreateDbContext(); - var item = context.BaseItems - .Include(e => e.TrailerTypes) - .Include(e => e.Provider) - .Include(e => e.Images) - .Include(e => e.LockedFields).AsNoTracking().AsSingleQuery().FirstOrDefault(e => e.Id == id); + var item = PrepareItemQuery(context, new() + { + DtoOptions = new() + { + EnableImages = true + } + }).FirstOrDefault(e => e.Id == id); if (item is null) { return null; |
