-
-
Notifications
You must be signed in to change notification settings - Fork 991
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
Image corruption / distortion / artifacting #29
Comments
How/when do you run your script exactly? Why is it possible to interrupt gallery-dl in the first place? |
It happens due to gallery-dl sudden stop or losing connection. I guess it would be better if @mikf can add logic for deleting not completely downloaded file on exit. |
A KeyboardInterrupt or any other exception raised during a download causes a partially downloaded file to be deleted, but killing the process obviously leaves the file in place. Installing some signal handlers could help against anything that isn't a SIGKILL, but then there is question of how this would work on Windows.
I don't know how Requests/urllib3 handles client-side network outages mid-download (exception? just silently closing/aborting the connection?), but a remote-server closing the connection preemptively gets silently ignored and could also lead to partially downloaded files, although that has never happened to me as far as I can tell. I think there are three things that should be done here:
|
By the way @mikf, add ability to set path for this |
- use '.part' files during file-download - implement continuation of incomplete downloads - check if file size matches the one reported by server
I've finally managed to rewrite the downloader modules to at least implement those three features I listed above, which should hopefully solve any issues regarding incomplete downloads and image corruption. I tested this quite thoroughly on my own machine and a Windows 7 VM, but it would be nice if someone could test this themselves and report any errors/problems and/or possible improvements. |
This little thing was not critical, but bugging with routine of checking last file of interrupted download session. |
- '--no-part' command line option to disable them - 'downloader.http.part' and 'downloader.text.part' config options Disabling .part files restores the behaviour of the old downloader implementation.
Note: The path set for 'downloader.*.part-directory' needs to point to an already existing directory.
edit: This could be considered an issue that the user is responsible for managing.
There's a possibility this issue is irrelevant to this module / program. After downloading a comic, I run a script that uses
zipfile
module to zip each image from each chapter into its own zip file separated by chapters.The possible issue with gallery-dl is:
I've had similar issues w/ other image downloading scripts.
image corruption e.g.s:
edit: to confirm it's not the source that is corrupt (http://www.mangareader.net/feng-shen-ji/26/13)
The text was updated successfully, but these errors were encountered: