Fix resuming of failed downloads + prettier terminal output #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I had my internet drop out a few times while downloading some manga, but once I was finished I realized that some pages had failed to download. Looking into the code, I noticed that the program only checked for the presence of the chapter directory to determine if it should skip, not the actual contents. If it dies in the middle of a chapter, it cannot go back for the remaining pages. This small rewrite checks each page's presence individually to ensure that everything has been downloaded. While I was changing things around, I also added carriage return to the printout of the downloads, so the output of the download itself goes from a wall of text to a single line that updates with each new page.