aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/Item/ChapterRepository.cs
diff options
context:
space:
mode:
authorJPVenson <github@jpb.email>2024-10-09 23:58:55 +0000
committerJPVenson <github@jpb.email>2024-10-09 23:58:55 +0000
commit2c2e33dd82de89ce2bc0fe664f5c753e42a716bc (patch)
treef329047cf908c2f2e089b6814951c2581babd4f3 /Jellyfin.Server.Implementations/Item/ChapterRepository.cs
parentfe9c96d052d6815f0d32833711a865c2f33d9999 (diff)
Updated .AsNoTracking() where applicable
Diffstat (limited to 'Jellyfin.Server.Implementations/Item/ChapterRepository.cs')
-rw-r--r--Jellyfin.Server.Implementations/Item/ChapterRepository.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Jellyfin.Server.Implementations/Item/ChapterRepository.cs b/Jellyfin.Server.Implementations/Item/ChapterRepository.cs
index d215a1d7a..dc55484c9 100644
--- a/Jellyfin.Server.Implementations/Item/ChapterRepository.cs
+++ b/Jellyfin.Server.Implementations/Item/ChapterRepository.cs
@@ -46,7 +46,7 @@ public class ChapterRepository : IChapterRepository
public ChapterInfo? GetChapter(Guid baseItemId, int index)
{
using var context = _dbProvider.CreateDbContext();
- var chapter = context.Chapters
+ var chapter = context.Chapters.AsNoTracking()
.Select(e => new
{
chapter = e,
@@ -65,7 +65,7 @@ public class ChapterRepository : IChapterRepository
public IReadOnlyList<ChapterInfo> GetChapters(Guid baseItemId)
{
using var context = _dbProvider.CreateDbContext();
- return context.Chapters.Where(e => e.ItemId.Equals(baseItemId))
+ return context.Chapters.AsNoTracking().Where(e => e.ItemId.Equals(baseItemId))
.Select(e => new
{
chapter = e,