sid25

Check if downloaded filelist is current

17 posts in this topic

Would it be possible to compare the users filelist with one already held in filelist directory - only download if different, otherwise use the info from the local filelist. Would save a lot of d/l b/w

Share this post


Link to post
Share on other sites

IMO this is a great idea, Apex can get the TTH for the FL, check it, and if they match - open the downloaded one. (with the right user, so match Q works)

Share this post


Link to post
Share on other sites

That would only be usefull if "Dont delete filelists uppon exit" option is set by default. But then again it could be set the other way around for security reasons, or even beacuse HDD usage.

Personally i have it set like that and my Apex folder now weights around 700MB, 300MB for hash data and the rest for downloaded filelists.

Share this post


Link to post
Share on other sites

Not only, but i agree that this way it'll me most effective. No need to change the default settings imo.

Share this post


Link to post
Share on other sites

the only flaw in this is that we can't get TTH of the filelist before we have downloaded it...

Share this post


Link to post
Share on other sites

When the client starts downloading it, it gets it, right ? (its appended at the end of the filename). So start downloading, and if it matches - remove it from source and open the dl-ed one.

Share this post


Link to post
Share on other sites

When the client starts downloading it, it gets it, right ? (its appended at the end of the filename). So start downloading, and if it matches - remove it from source and open the dl-ed one.

Nah it doesn't get it... because a) the "real" filename is files.xml.bz2 nad :P it's CID that is appended not TTH :)

Share this post


Link to post
Share on other sites

Damn, my bad, sry... (it looks a lot like TTH :P)

Can you do it with exact size ? or by some other way ? :)

Share this post


Link to post
Share on other sites

Not sure if exact size would work, I have files that are exactly equal in size (and content), but have different THH.

Share this post


Link to post
Share on other sites

Ok, then Dd, append TTH to filename, then as ifmn said.

Share this post


Link to post
Share on other sites

Ok, then Dd, append TTH to filename, then as ifmn said.

Zlob, that wouldn't resolve anything...

Share this post


Link to post
Share on other sites

Yup, we've been a bit driven off from the original request...

only download if different

Share this post


Link to post
Share on other sites

yes, so the string that looks like tth is cid there when getting someone's filelist .... but if you don't want it to work 100 times out of times, maybe enough 90 times out of 100 (it still keeps nettraffic and download time lower) to get at least two values which match, then don't download, but open the downloaded one ... for example ppl don't usually set different e-mail addresses on different hubs, but description and nick is usually different .... so what would happen if the client would check the filesize of the filelist and the mail address of the user ... and if both match with the one that has been downloaded before (okay, another sting would have to be added to the downloaded filelist containing the mail address of the user) ..... then simply opening the downloaded one .... would be an "almost solution" i think .... but you're the ones who know how clients work, so maybe finding another field which is always the same with a user (not depending on which hub she/he is on, and what description, emulation, nick she/he has) and store it with the downloaded filelist --> then check the filelist's size and that filed before downloading a filelist ... and if the size+"that thing" is the same then simply opening the already downloaded one.

don't know if that is understandable or not (as it was much easier to tell this in hungarian :( ), but that's sg like a trick ..

Share this post


Link to post
Share on other sites

The option to not download filelist if they are the exact same size then maybe? This is generally good enough, surely? BY no means would I expect it to be enabled by default, but if I think it's good enough to be an option. The chances of a user changing their filelist and the size not changing are low enough for me to risk it.

Share this post


Link to post
Share on other sites

Good idea Mirage... point 2 and 3 in my post from the link above, we are hardly progressing. :(

Oh well, with files, doesn't Apex get the TTH, then start the download, so it can search for alternates? Same with filelists or not? So, even if the CID is appended, isn't TTH taken too?

Share this post


Link to post
Share on other sites

I am guessing here, but couldn't a test be made on the possible local matched filelist by looking inside it for the TTH value of the required file, if exists use local otherwise carry on and d/l filelist.

Share this post


Link to post
Share on other sites