Closed ProximaNova closed 8 years ago
From what I can see in the original uploader.js code, https://github.com/Seedmanc/Booru-mass-uploader/blob/gh-pages/js/uploader.js#L209 it only shows the "exists" message if server responds with "exists" as well. The problem is in the booru engine itself, upon encountering errors says "image either exists or is corrupted", without differentiating between the issues. It even says so for images that were deleted and uploaded again later.
Upon closer inspection, booru does say somewhat different things depending on the situation and even when it links to a deleted duplicate, the link lacks the ID.
Based on that I improved the error reporting engine, it should now make more sense and even link to true duplicates. Please test.
Great, it works! However it could still be improved a little:
If the image already exists (or previously existed) then it links to either an ID number or no ID number: &id=#
or &id=
(meaning it was deleted). Thus, ": image either already exists or is corrupted." should say "" (nothing), ": generic error.", or ": too big? too small? corrupted?"
Also maybe for when &id=[nothing] the error could display: "image was deleted"
Done.
Say, you wanna be a collaborator here? I see you have to manually repeat my changes in your fork instead of pulling due to differences here and I might lack some booru-related knowledge to resolve proposed issues on my own. I never dealt with collaborations before though, do you have any experience?
Unless you want to continue maintaining your own version of course.
OK, I will collaborate; it will work better that way.
This is my first account on this sort of websites so I don't have much experience; I created this account due to the enthusiasm I had towards seeing the uploader script working again.
Added you as a collaborator, you can contribute here now. Keep in mind though that changes made to files other than the .user.js are live and will be immediately in effect for anyone using the userscript. Maybe eventually I'll figure out how to make a development branch compatible with gh-pages.
Tried to format the codebase and include some of your changes as well. There's probably not much need in putting every basic booru into include list now unless you're using those yourself. Users should be able to do that themselves following the pattern. Once we manage to add support for other engine boorus/modifications of Gelbooru, it would make sense to put examples of those into includes.
"[##:##] Couldn't upload [filename]: this image already exists." Is not always true, sometimes the image was too small, too large, corrupt, malicious...
I would be great if the upload failure logs would also say: "[##:##] Couldn't upload [filename]: this image does not already exists."