[REQ]Repair files
Moderator: Moderators
[REQ]Repair files
When I start downloading file to the directory where there is a file with the same name, then DC++ simply rewrite it. It would be better if it will compare
TTH of such two files and act like this:
1. TTH1 = TTH2 -> stop downloading;
2. TTH1 != (a bit) TTH2 -> download corrupted parts;
3. TTH1 != (absolutely) TTH2 -> overwrite or delete file or asking for a rename of the file
This function was very useful!
TTH of such two files and act like this:
1. TTH1 = TTH2 -> stop downloading;
2. TTH1 != (a bit) TTH2 -> download corrupted parts;
3. TTH1 != (absolutely) TTH2 -> overwrite or delete file or asking for a rename of the file
This function was very useful!
Re: [REQ]Repair files
Now it works like this altough the comparsion isn't done by TTH. If the file to download is equal or smaller than the existing one it won't be donwloaded and a message will be shown on the statusbar.mpioner wrote:1. TTH1 = TTH2 -> stop downloading;
There are no small and large differences between TTHs. If only 1 byte is different in 2 files then their TTH will be absolutely different. TTH is for properly identifying a file and it doesn't contain information about the contents of the file. So your 2. proposal is impossible to realize. (What is TTH -> See here)2. TTH1 != (a bit) TTH2 -> download corrupted parts;
3. TTH1 != (absolutely) TTH2 -> overwrite or delete file or asking for a rename of the file
For the 3. proposal I think so, there could be a better way. First I think the comparsion should be made by TTH and if its not the same then ask user or open a SaveDialog the way like Download to... function does.
It could be ok for a single file addition but when a folder added to the queue and more than one filename are the same as the ones existing in the same (sub)folders...
Everyone's got their opinions - They'll tell ya 'bout 'em all the time... /* Spock's Beard */
You're talking about Tiger hash (md5, svf), but here is Tiger !!!Tree!!! Hash... it splits the file in segments and calculates hash for each of segments and final hash consists of the sum of that hashes. That's why it's real to make feature (repair) that i'm talking about. Direct++ can do this, but it's not very suit.eMTee wrote:There are no small and large differences between TTHs. If only 1 byte is different in 2 files then their TTH will be absolutely different. TTH is for properly identifying a file and it doesn't contain information about the contents of the file. So your 2. proposal is impossible to realize. (What is TTH -> See here)2. TTH1 != (a bit) TTH2 -> download corrupted parts;
3. TTH1 != (absolutely) TTH2 -> overwrite or delete file or asking for a rename of the file
http://en.wikipedia.org/wiki/Tiger-Tree_Hash
I think it'll be better to make it like in files managers (i.e. Total Commander)For the 3. proposal I think so, there could be a better way. First I think the comparsion should be made by TTH and if its not the same then ask user or open a SaveDialog the way like Download to... function does.
It could be ok for a single file addition but when a folder added to the queue and more than one filename are the same as the ones existing in the same (sub)folders...
Now you unfolded what you mean (corrupted parts == segments containing corrupted data) and this way the idea is much closer to reality. Btw. (original) DC++ has no segment download capability so may your idea would be sooner realized by some mod developers (if it haven't been implemented yet)
So its a good practice to offer your improvement in a way the author likes it as well...
Many ideas are possible to make but you know the more your proposal can be built on the existing code of the application the sooner it will be made by the authorI think it'll be better to make it like in files managers (i.e. Total Commander)
So its a good practice to offer your improvement in a way the author likes it as well...
Everyone's got their opinions - They'll tell ya 'bout 'em all the time... /* Spock's Beard */
You misunderstood me. There is no need for segment file downloading of entire file. DC++ may download segments with corrupted data now, but I have to edit Queue.xml for that purpose.eMTee wrote:Now you unfolded what you mean (corrupted parts == segments containing corrupted data) and this way the idea is much closer to reality. Btw. (original) DC++ has no segment download capability so may your idea would be sooner realized by some mod developers (if it haven't been implemented yet)
I think it'll be better to make it like in files managers (i.e. Total Commander)
Many ideas are possible to make but you know the more your proposal can be built on the existing code of the application the sooner it will be made by the author
So its a good practice to offer your improvement in a way the author likes it as well...
poy wrote:about #3: if a TTH of an existing file has to be calculated before i download a file, it might take a long time... what if the existing file size is like 2 GB?
File size checking is pretty good, but dialog with Rename, Rewrite, Check TTH options is much better!eMTee wrote:Right. Maybe this is the exact reason why its done by filesize compare
I am sorry, I mistaken. edit Queue.xml it is necessary for strongDC++ only, for original DC++ more simply.
that I do:
I search for the original file ( not corrupted ) in dc++ and begin its download, as soon as downloading began, I set priority on pause and exit from program. Then I move to Temp folder ( temp for dc++) and search files in such format name.hash and replace downloaded files with my file ( corrupted ) . Then I run dc++ again and set priority to normal, DC++ will redownload broken parts of my corrupted file
that I do:
I search for the original file ( not corrupted ) in dc++ and begin its download, as soon as downloading began, I set priority on pause and exit from program. Then I move to Temp folder ( temp for dc++) and search files in such format name.hash and replace downloaded files with my file ( corrupted ) . Then I run dc++ again and set priority to normal, DC++ will redownload broken parts of my corrupted file