Changed taskProgress increment to call method that updates progress accordingly (with parent-tasks being also updated)

This commit is contained in:
2023-06-06 20:54:21 +02:00
parent 5b4a3b9d7c
commit 17ce820cf3
4 changed files with 32 additions and 10 deletions

View File

@ -183,7 +183,7 @@ public abstract class Connector
string extension = split[^1];
logger?.WriteLine("Connector", $"Downloading Image {chapter + 1:000}/{imageUrls.Length:000} {parentTask.publication.sortName} {parentTask.publication.internalId} Vol.{parentTask.chapter.volumeNumber} Ch.{parentTask.chapter.chapterNumber} {parentTask.progress:P2}");
DownloadImage(imageUrl, Path.Join(tempFolder, $"{chapter++}.{extension}"), requestType, referrer);
parentTask.progress += 1f / imageUrls.Length;
parentTask.IncrementProgress(1f / imageUrls.Length);
}
if(comicInfoPath is not null)