Better way of handling progress, and childProgress.

This commit is contained in:
2023-06-11 18:24:26 +02:00
parent af822febbe
commit 76604d84d8
4 changed files with 33 additions and 23 deletions

View File

@ -10,7 +10,7 @@ public class DownloadChapterTask : TrangaTask
public string language { get; }
public Chapter chapter { get; }
public DownloadChapterTask(Task task, string connectorName, Publication publication, Chapter chapter, string language = "en", TrangaTask? parentTask = null) : base(task, TimeSpan.Zero, parentTask)
public DownloadChapterTask(Task task, string connectorName, Publication publication, Chapter chapter, string language = "en", DownloadNewChaptersTask? parentTask = null) : base(task, TimeSpan.Zero, parentTask)
{
this.chapter = chapter;
this.connectorName = connectorName;

View File

@ -32,7 +32,7 @@ public class DownloadNewChaptersTask : TrangaTask
foreach (Chapter newChapter in newChapters)
{
DownloadChapterTask newTask = new (Task.DownloadChapter, this.connectorName!, pub, newChapter, this.language, this);
DownloadChapterTask newTask = new (Task.DownloadChapter, this.connectorName, pub, newChapter, this.language, this);
taskManager.AddTask(newTask);
this.childTasks.Add(newTask);
}