-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Features: multithread and tqdm progress bar #162
Conversation
Thanks for the feedback. pip install colorama I had this kind of behavior when I didn't use it with Windows. |
@darodi i've installed and there's no difference. I'll check this afternoon on Mac too |
-colorama requirement for windows -locking for windows at thread init
Here is the result using ubuntu 18.04 wsl https://asciinema.org/a/KKPjATHIAbCOpVb8PITz76itW trying you example I get https://asciinema.org/a/dBP34HkoxHvxIq5vw2Na8v1KC It seems better. However, doing some tests I noticed a few new problems with the multithread introduced in PR #161 I ran 2 multithread downloads on the same host for 2 different mangas. Another consequence of the multi thread is the fact that the abort "ctrl-c" isn't working anymore. Regards, darodi |
@darodi Hi, nice. Maybe leaving only the overall chapter bar instead of showing too the page bar could look cleaner and avoid the strange printing. About the run you did, did you run two python main.py -.... ? If so, yeah, for now the amount of threads that it uses is fixed to 4, I was waiting to merge to add it as a param for the different computers that don't support so many threads or can support more. Keep in mind that having more threads can potentially trigger the bot countermeasures the pages could have(as cloudfare for example) and give you the 503. Is open on issue #134 . Regarding the ctrl+C i'll try to enable to cut the execution when that happens. Thanks for the work! |
new commit. I disabled the progress bars for each file. The issue I was pointing out is the error handling. Let's say I'm using comic-dl in auto download mode for 10 comics. Currently, if there is any error downloading the 3rd image of the 4th chapter of the 5th comic, In that case, it would be better not to call |
Awesome!!! https://asciinema.org/a/3L8vAgrYGKdl8Pcw86MYen4tN I'll try to work on the variable thread number and the error handling ASAP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice refactor of the multithread, I did it on a hurry changing all the files d'oh!
I would remove the commented code though
…es the entry being processed)
For the moment, for each chapter, 4 threads are created to download the queue containing images. i.e.
I must admit I haven't checked the time taken to create the threads. |
tqdm progress bar for files (+ requirements for windows)(removed, better display without it)tqdm changes based on #159
fixes #123
fixes #153