Fix resuming of failed downloads + prettier terminal output - #2
Closed
Cleanup-Crew-From-Discord wants to merge 2 commits into
Closed
Cleanup-Crew-From-Discord wants to merge 2 commits into
Cleanup-Crew-From-Discord wants to merge 2 commits into
Conversation
download logic would cause an incomplete chapter to be skipped over when re-running after a crash. Scanning for the presence of each page fixes this, and I decided to neaten the output using carriage return to get rid of the block of text while I was at it.
download logic would cause an incomplete chapter to be skipped over when re-running after a crash. Scanning for the presence of each page fixes this, and I decided to neaten the output using carriage return to get rid of the block of text while I was at it. also I managed to mess up the style formatting in one place, so I'll fix it and just re-use the old commit message to hide the fact that I somehow misplaced an enter keypress :)
Owner
|
Hey there, I completely missed this for some reason, GitHub notifications are not very reliable it seems. I ended up merging a newer PR with similar changes, but I will be adding you as contributor. Also some optimization coming up if you're still using this. Cheers! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.