mirror of
https://github.com/C9Glax/tranga.git
synced 2025-05-22 06:03: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();
|
.AutoInclude();
|
||||||
modelBuilder.Entity<Manga>()
|
modelBuilder.Entity<Manga>()
|
||||||
.Navigation(m => m.Chapters)
|
.Navigation(m => m.Chapters)
|
||||||
.AutoInclude();
|
.AutoInclude(false);
|
||||||
//Manga owns MangaAltTitles
|
//Manga owns MangaAltTitles
|
||||||
modelBuilder.Entity<Manga>()
|
modelBuilder.Entity<Manga>()
|
||||||
.OwnsMany<MangaAltTitle>(m => m.AltTitles)
|
.OwnsMany<MangaAltTitle>(m => m.AltTitles)
|
||||||
|
@ -34,6 +34,7 @@ public class MoveMangaLibraryJob : Job
|
|||||||
protected override IEnumerable<Job> RunInternal(PgsqlContext context)
|
protected override IEnumerable<Job> RunInternal(PgsqlContext context)
|
||||||
{
|
{
|
||||||
context.Attach(Manga);
|
context.Attach(Manga);
|
||||||
|
context.Entry(Manga).Collection<Chapter>(m => m.Chapters).Load();
|
||||||
Dictionary<Chapter, string> oldPath = Manga.Chapters.ToDictionary(c => c, c => c.FullArchiveFilePath);
|
Dictionary<Chapter, string> oldPath = Manga.Chapters.ToDictionary(c => c, c => c.FullArchiveFilePath);
|
||||||
Manga.Library = ToLibrary;
|
Manga.Library = ToLibrary;
|
||||||
try
|
try
|
||||||
|
@ -29,6 +29,7 @@ public class UpdateFilesDownloadedJob : Job
|
|||||||
protected override IEnumerable<Job> RunInternal(PgsqlContext context)
|
protected override IEnumerable<Job> RunInternal(PgsqlContext context)
|
||||||
{
|
{
|
||||||
context.Attach(Manga);
|
context.Attach(Manga);
|
||||||
|
context.Entry(Manga).Collection<Chapter>(m => m.Chapters).Load();
|
||||||
foreach (Chapter chapter in Manga.Chapters)
|
foreach (Chapter chapter in Manga.Chapters)
|
||||||
chapter.Downloaded = chapter.CheckDownloaded();
|
chapter.Downloaded = chapter.CheckDownloaded();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user