more scanning improvements related to media file table (#2754)

This commit is contained in:
Jason Dove
2026-01-04 19:16:06 -06:00
committed by GitHub
parent 89bb3759de
commit a96ef328a5
6 changed files with 14 additions and 7 deletions
@@ -118,12 +118,11 @@ public class MetadataRepository(IDbContextFactory<TvContext> dbContextFactory) :
await using TvContext dbContext = await dbContextFactory.CreateDbContextAsync();
Option<MediaVersion> maybeVersion = await dbContext.MediaVersions
.TagWithCallSite()
.Include(v => v.Streams)
.Include(v => v.Chapters)
.Include(v => v.MediaFiles)
.OrderBy(v => v.Id)
.SingleOrDefaultAsync(v => v.Id == mediaVersionId)
.Map(Optional);
.SingleOrDefaultAsync(v => v.Id == mediaVersionId);
return await maybeVersion.Match(
async existing =>