Split UpdateFilesDownloadedJob.cs to UpdateChaptersDownloadedJob.cs and split into UpdateSingleChapterDownloadedJob.cs

This commit is contained in:
2025-05-16 20:12:08 +02:00
parent be2adff57d
commit 563afa1e6f
17 changed files with 951 additions and 71 deletions

View File

@ -102,14 +102,14 @@ public class DownloadSingleChapterJob : Job
context.Jobs.Load();
if (context.Jobs.AsEnumerable().Any(j =>
{
if (j.JobType != JobType.UpdateFilesDownloadedJob)
if (j.JobType != JobType.UpdateChaptersDownloadedJob)
return false;
UpdateFilesDownloadedJob job = (UpdateFilesDownloadedJob)j;
UpdateChaptersDownloadedJob job = (UpdateChaptersDownloadedJob)j;
return job.MangaId == this.Chapter.ParentMangaId;
}))
return [];
return [new UpdateFilesDownloadedJob(Chapter.ParentManga, 0, this.ParentJob)];
return [new UpdateChaptersDownloadedJob(Chapter.ParentManga, 0, this.ParentJob)];
}
private void ProcessImage(string imagePath)