Better way of handling progress, and childProgress.

More reliable taskFinishTime
This commit is contained in:
2023-06-11 17:04:33 +02:00
parent 3b2643d949
commit 36f7cbd3e9
5 changed files with 25 additions and 48 deletions

View File

@ -11,6 +11,7 @@ public class DownloadChapterTask : TrangaTask
public Chapter chapter { get; }
[JsonIgnore]public DownloadNewChaptersTask? parentTask { get; set; }
public string? parentTaskId { get; set; }
[JsonIgnore]public new double progress { get; private set; }
public DownloadChapterTask(Task task, string connectorName, Publication publication, Chapter chapter, string language = "en", DownloadNewChaptersTask? parentTask = null) : base(task, TimeSpan.Zero)
@ -21,6 +22,7 @@ public class DownloadChapterTask : TrangaTask
this.language = language;
this.parentTask = parentTask;
this.parentTaskId = parentTask?.taskId;
this.progress = 0;
}
protected override void ExecuteTask(TaskManager taskManager, Logger? logger, CancellationToken? cancellationToken = null)