diff --git a/Tranga/TrangaTasks/DownloadChapterTask.cs b/Tranga/TrangaTasks/DownloadChapterTask.cs index 0638a34..7fa1204 100644 --- a/Tranga/TrangaTasks/DownloadChapterTask.cs +++ b/Tranga/TrangaTasks/DownloadChapterTask.cs @@ -24,8 +24,12 @@ public class DownloadChapterTask : TrangaTask { if (cancellationToken?.IsCancellationRequested??false) return; + if(this.parentTask is not null) + this.parentTask.state = ExecutionState.Running; Connector connector = taskManager.GetConnector(this.connectorName); connector.DownloadChapter(this.publication, this.chapter, this, cancellationToken); + if(this.parentTask is not null) + this.parentTask.state = ExecutionState.Waiting; taskManager.DeleteTask(this); }