[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-users] How to import temp from newer eDonkey2000 clients
From: |
Mario J. Barchéin Molina |
Subject: |
[Mldonkey-users] How to import temp from newer eDonkey2000 clients |
Date: |
Tue, 8 Jul 2003 19:09:07 +0200 |
User-agent: |
KMail/1.5.2 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> Thats possible. I already saw that insted of one .part file for
> each download there are one .part files for each 9MB-Block.
> So my 11GB of partial downloads have to go to /dev/null?! Is there a
> possibility to get the files back in my downloadlist and begin
> re-downloading everything. The.met files still exists in the new
> format.
There's a tricky way to import the new format. The process is the
following for each file you want to import:
1) You must know the exact size (in bytes) and ed2k hash of the file
2) Create a blank file with a lenght of 9500KB (9728000 bytes). You can
do this easily with
> dd if=/dev/zero of=blank_file bs=100k count=95
3) For each .part of _that is not the last one_ and is not exactly
9500KB (9728000 bytes) copy the blank_file to that .part
Example:
1.part -> 9500KB (OK)
2.part -> 9500KB (OK)
3.part -> 9140KB (not OK. cp blank_file 3.part)
4.part -> 2300KB (not OK. cp blank_file 4.part)
5.part -> 9500KB (OK)
..
68.part -> 134KB (don't touch, is the last one)
4) Compute the size and number of the last chunk.
- size_last = total size of the file % 9728000 (remainder of the
integer division).
- number_last = ceil of (total size of the file / 9728000) (The first
integer number greater than the division).
You can use the bash builtin mathematical functions. Example:
> expr 683742765 % 9728000
2782765 <- size of the last chunk is 2782765 bytes
> expr 683742765 / 9728000
70 <- The number of chunks is 70+1 = 71 chunks
5) Check if you have the last chunk and if its size matches the one
computed in step 4)
6) If you don't have the last chunk or the size doesn't match, create it
with "dd if=/dev/zero of=number_last.part bs=1b count=size_last". You
must substitute in the previous command number_last and size_last with
the ones you calculated in 4)
7) Check you have all the chunks. If some is missing, copy blank_file to
the missing chunk. You must have exactly number_last chunks, from chunk
1 to (number_last - 1) with size 9500KB and the last one with size
size_last as calculated in 4)
8) Concatenate all the chunks with "cat ?.part ??.part > ED2KHASH".
Replace ED2KHASH with the hash of the original file. You can check it
in eDonkey2000 client. Use uppercase letters for the hash filename.
Example:
cat ?.part ??.part > 3D829FF585F032988702EAB21FE5C42A
9) Move the new file to the temp directory of mlnet. Example:
mv 3D829FF575F032988706EAB21FE5C42A /some/dir/temp
10) In mlnet, execute the command recover_temp
11) That's it ;). After some minutes you'll see the name of the file you
were downloading in your mlnet client. If you don't see the filename
either the file size of the hash of the file were badly introduced. The
chunks that were fully donwloaded in eDonkey2000 will be recovered
successfully after some seconds of hashing.
What you are doing here is using the recover temp option from mlnet.
First you discard partially downloaded chunks from eDonkey2000 and then
concatenate all chunks and rename then properly to the way mlnet uses.
The drawback of this method is that you'll lose the partial chunks and
you'll have to redownload them.
IT IS ADVICED TO WORK WITH A COPY OF ORIGINAL FILES, AS DATA OF
PARTIALLY DONWLOADED CHUNKS WILL BE LOST. You are warned :)
I think this could be included in the wiki...
Good luck
- --
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Mario J. Barchéin Molina. Granada (Spain)
mario AT/EN judas.2y.net
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQE/CvqzFzNiq0CnxEERAljFAJ94hC6jMYnBMCizC3LDt4oVDfotGQCg0POb
tBA57Kewtt/I7oQOZSIAhes=
=IVw+
-----END PGP SIGNATURE-----