Lazy Load Jobs.DependsOnJobs, Manga.Chapters

This commit is contained in:
2025-05-16 21:53:59 +02:00
parent 6258e07f20
commit 225b7f02ad
7 changed files with 45 additions and 42 deletions

View File

@ -40,7 +40,6 @@ public class RetrieveChaptersJob : Job
protected override IEnumerable<Job> RunInternal(PgsqlContext context)
{
context.Entry(Manga).Collection<Chapter>(m => m.Chapters).Load();
// This gets all chapters that are not downloaded
Chapter[] allChapters = Manga.MangaConnector.GetChapters(Manga, Language);
Chapter[] newChapters = allChapters.Where(chapter => Manga.Chapters.Contains(chapter) == false).ToArray();