Added DecrementProgress function to TrangaTask

This commit is contained in:
glax 2023-06-09 23:38:28 +02:00
parent 5bce3c6fdd
commit a3a96b6b55
2 changed files with 14 additions and 0 deletions

View File

@ -58,6 +58,13 @@ public abstract class TrangaTask
this.lastChange = DateTime.Now;
return this.progress;
}
public float DecrementProgress(float amount)
{
this.progress -= amount;
this.lastChange = DateTime.Now;
return this.progress;
}
/// <summary>
/// BL for concrete Tasks

View File

@ -24,6 +24,13 @@ public class DownloadNewChaptersTask : TrangaTask
this.lastChange = DateTime.Now;
return this.progress;
}
public new float DecrementProgress(float amount)
{
this.progress -= amount / this.childTaskAmount;
this.lastChange = DateTime.Now;
return this.progress;
}
protected override void ExecuteTask(TaskManager taskManager, Logger? logger)
{