From d9ccf71b2195f1d701b8f846bfc1556206d4a2d5 Mon Sep 17 00:00:00 2001 From: glax Date: Wed, 18 Jun 2025 01:18:06 +0200 Subject: [PATCH] DownloadSingleChapterJob add check if chapter is already downloaded before re-downloading --- API/Schema/Jobs/DownloadSingleChapterJob.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/API/Schema/Jobs/DownloadSingleChapterJob.cs b/API/Schema/Jobs/DownloadSingleChapterJob.cs index 650ad55..30e27fb 100644 --- a/API/Schema/Jobs/DownloadSingleChapterJob.cs +++ b/API/Schema/Jobs/DownloadSingleChapterJob.cs @@ -45,6 +45,11 @@ public class DownloadSingleChapterJob : Job protected override IEnumerable RunInternal(PgsqlContext context) { + if (Chapter.Downloaded) + { + Log.Info("Chapter was already downloaded."); + return []; + } string[] imageUrls = Chapter.ParentManga.MangaConnector.GetChapterImageUrls(Chapter); if (imageUrls.Length < 1) {