AlexCSDev / PatreonDownloader

Powerful tool for downloading content posted by creators on patreon.com. Supports content hosted on patreon itself as well as external sites (additional plugins might be required).
MIT License
969 stars 99 forks source link

Automatically delete files that were not downloaded successfully #155

Closed Ovear closed 1 year ago

Ovear commented 1 year ago

If an exception was thrown during the download process or manually interrupted download, we should remove it.

Since corrupted files will just leave there and the program will skip those files if we are not using "--overwrite-files" directives.

And it's inconvenience to identity those files and handle it manually.

AlexCSDev commented 1 year ago

Since going through big download directories might be slow this is now implemented in the following way: files are downloaded as temporary files (*.dwnldtmp) first and then renamed with a proper name (or removed) after all checks have completed. On subsequent download attempts of the file the temporary file will be removed automatically if it was left there after a crash. If you need to do mass cleanup you can search for those *.dwnldtmp files manually and delete them safely.

Update to latest version to use this feature.