mirror of
https://github.com/C9Glax/tranga.git
synced 2025-05-21 21:53:01 +02:00
Do not autoinclude chapters for Manga
This commit is contained in:
parent
a5954ed5c8
commit
4247ae7740
@ -136,7 +136,7 @@ public class PgsqlContext(DbContextOptions<PgsqlContext> options) : DbContext(op
|
||||
.AutoInclude();
|
||||
modelBuilder.Entity<Manga>()
|
||||
.Navigation(m => m.Chapters)
|
||||
.AutoInclude();
|
||||
.AutoInclude(false);
|
||||
//Manga owns MangaAltTitles
|
||||
modelBuilder.Entity<Manga>()
|
||||
.OwnsMany<MangaAltTitle>(m => m.AltTitles)
|
||||
|
@ -34,6 +34,7 @@ public class MoveMangaLibraryJob : Job
|
||||
protected override IEnumerable<Job> RunInternal(PgsqlContext context)
|
||||
{
|
||||
context.Attach(Manga);
|
||||
context.Entry(Manga).Collection<Chapter>(m => m.Chapters).Load();
|
||||
Dictionary<Chapter, string> oldPath = Manga.Chapters.ToDictionary(c => c, c => c.FullArchiveFilePath);
|
||||
Manga.Library = ToLibrary;
|
||||
try
|
||||
|
@ -29,6 +29,7 @@ public class UpdateFilesDownloadedJob : Job
|
||||
protected override IEnumerable<Job> RunInternal(PgsqlContext context)
|
||||
{
|
||||
context.Attach(Manga);
|
||||
context.Entry(Manga).Collection<Chapter>(m => m.Chapters).Load();
|
||||
foreach (Chapter chapter in Manga.Chapters)
|
||||
chapter.Downloaded = chapter.CheckDownloaded();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user