ansani / Shareaza

Shareaza is a peer-to-peer client for Windows that allows you to download any file-type found on several popular P2P networks.
http://shareaza.sf.net
26 stars 4 forks source link

When a chunk is identified as “corrupted”, Shareaza should allow to download it anyway #93

Open abolibibelot1980 opened 1 year ago

abolibibelot1980 commented 1 year ago

Some file types are likely to be modified merely by opening them with a dedicated utility. The most common “offenders” are : XLS, PPS, EPUB (often modified by Calibre which I stopped using very quickly for that reason), and to a lesser extent other types of document files (XLSX, DOC, DOCX, ODT...). When Shareaza identifies even a tiny chunk of data which doesn't have the expected checksum, it stops the download altogether, and rejects the source for uploading “corrupted” parts. But that source could be unique, and the file is most likely valid even though it was slightly modified, so Shareaza should allow to download it anyway. (With Shareaza 2.7.10.2 it's only possible by disabling all verification options, which is certainly not recommended.) For these files at least (or for all files), there should be an option to 1) either stop the download right away and reject the source (as it does currently) ; 2) continue the download anyway, and make it very clear that at least one checksum didn't match the expected value (mark the file in red instead of green, indicate how much data was found invalid, either in the “Status” / “Client” columns, or with an extra suffix in the file name like “[# up to 64KB of invalid data #]”, or both) ; or 3) ask the user what to do on a case-by-case basis.

If possible, it could also trigger a re-hash on the uploader's end — but then it becomes complicated, as the uploader may have no clue about it, and the modification could have several possible causes : 1) either a simple modification by merely opening the file as mentioned above, in which case it could be re-shared (although it may add some clutter and confusion in the search results, it may still be beneficial for very rare files) ; 2) or any kind of software / hardware corruption, in which case it shouldn't be shared anymore (but even that can be beneficial in the long run : in some instances, I have been able to rebuild a file which no longer had any complete source by merging it with a slightly corrupted version which happened to have the missing chunk(s) from the original file complete and available — but I'll admit that it's tricky in and of itself to identify which one is the original / flawless file and which one is a corrupted copy, and I'm in an insanely tiny minority for even attempting that kind of trick, but I did get some efficient techniques for such purposes when I created this thread on the VideoHelp forum).