Originally posted by phoenix
Well, I think that the problem here is how do we do that in a platform independent way. As far as I can tell, we don't store this information ourselves in met files. Of course, in Linux there is the part file creation date, that we can access through stat(), but that is probably not platform independent. There is an (undocumented?) function wxStat(), but to use it one would have to create a mess of #ifdefs in the code for each supported (?) platform.
Hmmm, I see the problem.
FWIW, I tried writing a script do this by extracting the date and time the download was started, which, as you know, is recorded in the logfile like this:
2006-11-15 13:55:17: Downloading IPfilter.rev39.ShadowCast.rar
These I wrote to a separate file (since the logs get erased). I thought I could compare them with the entries that are logged when the downloads are done:
2006-12-01 13:55:17: Finished downloading: IPfilter.rev39.ShadowCast.rar
This would have worked, once I got the date math sorted out, except for the fact that I have the habit of cleaning up filenames; in my case, they almost never remain the same.
Now, if in addition to the file name aMule would also write the
hash of the file to logfile when the download starts, then I could get around this, since the hash is also available via the Events interface. Then, when my script is triggered by a finished download, it could look up the date and time the download was started via its hash in my file of start dates & times. Presto!
Do you follow me?
There is, however, a tag in the met file that aMule does not currently use, which is called FT_DL_ACTIVE_TIME. I don't have the information here, but maybe that is the information you want. If I have some time I will see if that is true and if it is easy to integrate and keep this information.
Thanks, that would also be helpful, if it is not too much trouble...