Hey,
I'm finishing up the last couple UDP API commands. For the commands FILE, MYLIST, MYLISTADD, and MYLISTDEL, I can't find an explanation in the documentation about the following:
{int4 lid} - mylist id. I have no clue what this is. fid was mentioned in the wiki, but not lid. It seems to be another form of unique id for files?
{int4 size}, {str ed2k} - size+ed2k. What are the units for size? And, just curious, why is size needed if ed2k hashes are unique?
I tried searching through the forums and reading the doc, but the forum gave me a bunch of DB change requests. Any help would be greatly appreciated.
size+ed2k UDP API question
Moderator: AniDB
Re: size+ed2k UDP API question
(Not an official answer)
which holds "ON DISK", and other stuff.
This is your Id for your mylist entry.MistaMuShu wrote:{int4 lid} - mylist id.
which holds "ON DISK", and other stuff.
size is in bytes, exact number.MistaMuShu wrote:{int4 size}, {str ed2k} - size+ed2k. What are the units for size?
Re: size+ed2k UDP API question
(Not an official answer, either. plus just a guess)
I'm guessing that's an error in the documentation. It's asking for {str md4} and not the whole ed2k hash. An ed2k hash basically is of this format: ed2k://|file|filename|size|md4|MistaMuShu wrote:{int4 size}, {str ed2k} - size+ed2k. What are the units for size? And, just curious, why is size needed if ed2k hashes are unique?
Re: size+ed2k UDP API question
No, that's really totally wrong.hhaamu wrote:(Not an official answer, either. plus just a guess)
I'm guessing that's an error in the documentation. It's asking for {str md4} and not the whole ed2k hash. An ed2k hash basically is of this format: ed2k://|file|filename|size|md4|MistaMuShu wrote:{int4 size}, {str ed2k} - size+ed2k. What are the units for size? And, just curious, why is size needed if ed2k hashes are unique?
No ed2k hash is guaranteed to be unique. To make the chance of a clash lower the size of a file is also included in an ed2k link (notice, a link is not a hash). Thus the api uses both the size and the ed2k hash to identify a file.
The ed2k hash itself uses md4 but it's not a true md4 hash if the file is larger than 9.5 mb, instead it's the hash of the hashes of all 9.5mb chunks.
I encourage you to do some reading if you want to create ed2k hashes yourself.
ed2k://|file|filename|size|md4| is an ed2k LINK
an ed2k link has these fields
ed2k://|file|filename|size|ed2khash|
(actually it has more but I don't want to go too deep)
lid is a mylist id. it does only indirectly point to a file. basically it's the file<->user relation.
size is in bytes.
ed2k is an ed2k _hash_, not a complete ed2k link. So it does not contain size information. However size+ed2k together are used to identify files, so size is always a required field.
BYe!
EXP
size is in bytes.
ed2k is an ed2k _hash_, not a complete ed2k link. So it does not contain size information. However size+ed2k together are used to identify files, so size is always a required field.
BYe!
EXP