You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When for an arbitrary reason the download of a series has failed and is re-started from scratch then already downloaded files are completely downloaded again and overwritten.
It would be great if a check would be implemented if a file is already present and then skip the download. This could also be activated / skipped by a flag if it's more convenient for other users to keep the default behavior.
Another thing is - in case already present files are not overwritten then partly downloaded files would also be kept but in my opinion they should always be deleted in an error case or at least marked as unfinished. To be 100% crash-safe on this end one could think of a temporary filename for the download process (just like the name + ".tmp") and rename it to the desired filename after success.
The text was updated successfully, but these errors were encountered:
Noctunus
changed the title
Feature Request: Don't overwrite already downloaded files but delete unfinished files
Feature Request: Don't overwrite already downloaded files but delete/flag unfinished files
Mar 18, 2019
For this the target file size has to be known up-front and at least the HTTP standard allows chunked transfer of files where you only know that the file is completed if it's returned as completed in the last chunk. Therefore a fail-proof way to receive files would be to save it to a temporary filename and only if it's finished successful rename it to the target filename. This would solve several things at once:
You can be sure that the target filename is a complete file instead of only a part in an error case.
If the target filename is already present you can just skip it without looking at sizes.
Resuming a download would be possible as you know that the temp filename only consists of a part - to keep it simple you could just skip this and re-download the whole file with the same temp filename just overwriting the old data.
Also the implementation should be pretty simple (assuming the target filename is $name) :
If $name already exists just skip the current file
When for an arbitrary reason the download of a series has failed and is re-started from scratch then already downloaded files are completely downloaded again and overwritten.
It would be great if a check would be implemented if a file is already present and then skip the download. This could also be activated / skipped by a flag if it's more convenient for other users to keep the default behavior.
Another thing is - in case already present files are not overwritten then partly downloaded files would also be kept but in my opinion they should always be deleted in an error case or at least marked as unfinished. To be 100% crash-safe on this end one could think of a temporary filename for the download process (just like the name + ".tmp") and rename it to the desired filename after success.
The text was updated successfully, but these errors were encountered: