-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add compress to cbz option #7
base: master
Are you sure you want to change the base?
Conversation
Implement compressing chapters to .cbz files
I only dabble with Python so hopefully this was implemented in an acceptable fashion. |
with ThreadPoolExecutorWithQueueSizeLimit(maxsize=10, max_workers=4) as pool: | ||
for page_number, url in enumerate(img_urls): | ||
pool.submit(download_image, chapter_download_task_id, url, dest, chapter_info.chapter_number, page_number, image_format=images_format) | ||
image_download_futures.add( | ||
pool.submit(download_image, chapter_download_task_id, url, dest, chapter_info.chapter_number, page_number, image_format=images_format) |
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.
Images will still be downloaded to the provided dest
, so ending up with a copy of the images and the .cbz as well
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.
This function needs to change anyways in order to allow for .cbz conversion in memory maybe.
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.
Yeah, I left the existing files and folder in place because I didn't want to assume too much about what should change. I mostly added this to scratch my own itch of not wanting to deal with 150+ folders to compress for the toon I wanted to download.
I'll try to do some major changes to enable this to work well while keeping the download as fast as it always is. While also keeping the main thread not being overloaded with the work of zipping. |
Make sure both separate options are considered Co-authored-by: Ali Taibi <[email protected]>
As I mentioned above, this was done to scratch my own itch. If you'd prefer to do it your own way and skip this PR that's fine with me. |
Last version allows to use |
--separate
option with a--cbz
option, which compresses each chapter into a .cbz file