mirror of
https://github.com/C9Glax/tranga.git
synced 2025-07-04 01:44:17 +02:00
Added taskId to trangaTask and parentTaskId to DownloadChapterTask as unique identifier to attach ChildTasks to ParentTask on deserialization.
This commit is contained in:
@ -9,7 +9,9 @@ public class DownloadChapterTask : TrangaTask
|
||||
public Publication publication { get; }
|
||||
public string language { get; }
|
||||
public Chapter chapter { get; }
|
||||
[JsonIgnore]public DownloadNewChaptersTask? parentTask { get; init; }
|
||||
[JsonIgnore]public DownloadNewChaptersTask? parentTask { get; set; }
|
||||
public string? parentTaskId { get; set; }
|
||||
|
||||
|
||||
public DownloadChapterTask(Task task, string connectorName, Publication publication, Chapter chapter, string language = "en", DownloadNewChaptersTask? parentTask = null) : base(task, TimeSpan.Zero)
|
||||
{
|
||||
@ -18,6 +20,7 @@ public class DownloadChapterTask : TrangaTask
|
||||
this.publication = publication;
|
||||
this.language = language;
|
||||
this.parentTask = parentTask;
|
||||
this.parentTaskId = parentTask?.taskId;
|
||||
}
|
||||
|
||||
protected override void ExecuteTask(TaskManager taskManager, Logger? logger, CancellationToken? cancellationToken = null)
|
||||
|
Reference in New Issue
Block a user