Job Run pass context to add new Data

This commit is contained in:
2024-12-16 23:29:57 +01:00
parent 9cb5f636dd
commit 16dd1ffa97
5 changed files with 8 additions and 12 deletions

View File

@ -18,7 +18,7 @@ public class DownloadSingleChapterJob(string chapterId, string? parentJobId = nu
public string ChapterId { get; init; } = chapterId;
public virtual Chapter Chapter { get; init; }
protected override IEnumerable<Job> RunInternal()
protected override IEnumerable<Job> RunInternal(PgsqlContext context)
{
MangaConnector connector = Chapter.ParentManga.MangaConnector;
DownloadChapterImages(Chapter);
@ -50,8 +50,6 @@ public class DownloadSingleChapterJob(string chapterId, string? parentJobId = nu
//Download all Images to temporary Folder
if (imageUrls.Length == 0)
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
File.SetUnixFileMode(saveArchiveFilePath, UserRead | UserWrite | UserExecute | GroupRead | GroupWrite | GroupExecute);
Directory.Delete(tempFolder, true);
return false;
}