v0.6.2.3 Reupload
Pre-releaseWARNING: DOWNLOAD FROM #29 AS IT FIXES A CRITICAL BUG CAUSED BY A KEMONO PARTY UPDATE. DO NOT USE THE FILES PROVIDED IN THIS RELEASE. VIEW #33 FOR MORE DETAILS.
Took the release down for a bit to remove instances of "Published" in the file name which was a result of a recent Kemono UI update I wasn't aware of. Sorry for any inconveniences this may have caused.
Pretty significant update this time around aimed at fixing the issues of dupe files and adding --RENAME switch which took a lot of work. If you encounter any issues with this update, submit an issue and use the last version which only has bug fixes and no major code changes like this release. I will spend some time this week working on the wiki.
1. --RENAME switch
Straightforward switch, if you download an works and the program finds these works already exists, they will be renamed accordingly. I will include some cases where --RENAME switch is used:
Default case
We begin with this case. The switches used will be shown on the top of each case. URL used is "https://kemono.party/patreon/user/574050?q=dog+girl" (R-18 warning):
"C:/Users/Jeff Chen/AppData/Local/Microsoft/WindowsApps/python3.10.exe" m:/Projects/KMP-Kemono-Downloader/KMPDownloader.py -d ".\Sample"
Rename case
Rename the files but do not include id or date:
"C:/Users/Jeff Chen/AppData/Local/Microsoft/WindowsApps/python3.10.exe" m:/Projects/KMP-Kemono-Downloader/KMPDownloader.py -d ".\Sample" --RENAME --id --date
Note that if unzipped files exist in the old directory, it will not be moved and another zip file will be downloaded and unzipped in the new directory. This also means that the old directory will not be deleted since it is not empty. --RENAME only works with --id and --date and cannot be used to change unpacked to packed file structure and vice versa.
Revert case
If I want to revert back to the directories shown in the default case, I will need to use the --RENAME switch. Not using the switch results in the following directories during program execution:
However, after execution, you will end up with what you started with:
Now with the --RENAME switch, we now get the result we want:
"C:/Users/Jeff Chen/AppData/Local/Microsoft/WindowsApps/python3.10.exe" m:/Projects/KMP-Kemono-Downloader/KMPDownloader.py -d ".\Sample" --RENAME
2. Improved duplicate works downloading
Added another duplication check layer during the URL scraping phase which fixed the issues of overwriting encountered when downloading works with the same name. For example, "https://kemono.su/patreon/user/574050?q=toriel" (R-18 warning) has 5 works with the same name. When downloaded with --id and --date switches, we now get:
3. --id switch
Prepends work ID to the beginning of the file or folder depending on unpacked or packed download structure
4. Default switches
--id and --date is now on by default. Using --id or --date will turn off the switch instead of enabling it.
5. Automatic dupe file resolution
If a file was downloaded multiple times mistakenly, it will now automatically removed or renamed according to the circumstance. For example:
Folder
- 0.jpg (100b)
- 0 (0).jpg (100b)
When running the program, if it happens to download 0.jpg (100b) again, it will remove the 0 (0).jpg, resulting in:
Folder
- 0.jpg (100b)
6. UPDATE database updated for different prefixes
When downloading works with different prefixes (.party, .su), prefixes are ignored in the update database and only the artist id and service portion of the url is taken into account. Databases with the same artist with multiple prefixes are automatically removed when the artist work is updated.
7. Fixed bug for dupe entries in file preload system
Reduces memory use and fixes bugs from the duplicate entries.
8. Bad switch reminders
When entering a switch incorrectly, the program will report this to the user instead of crashing outright. This feature needs more work to cover all the cases but works for many cases as for this release.
9. Zip error reporting
Zip errors are now reported to the log instead of being skipped.