--- ed2k_metutils.py.orig 2003-05-06 11:53:14 UTC +++ ed2k_metutils.py @@ -6,24 +6,24 @@ # tested on macosx 10.2.4, python 2.2 import struct; -import types; import sys; # Some defines. TAG_TYPE_STRING = 2; TAG_TYPE_INTEGER = 3; +TAG_TYPE_BLOB = 7 -TAG_HANDLE_FILENAME = chr( 1 ); -TAG_HANDLE_FILESIZE = chr( 2 ); -TAG_HANDLE_FILETYPE = chr( 3 ); -TAG_HANDLE_FILEFORMAT = chr( 4 ); -TAG_HANDLE_SOFAR = chr( 8 ); -TAG_HANDLE_GAP_START = chr( 9 ); -TAG_HANDLE_GAP_END = chr( 10 ); -TAG_HANDLE_TEMP_NAME = chr( 18 ); -TAG_HANDLE_PAUSED = chr( 20 ); -TAG_HANDLE_PRIORITY = chr( 24 ); +TAG_HANDLE_FILENAME = b'\x01' +TAG_HANDLE_FILESIZE = b'\x02' +TAG_HANDLE_FILETYPE = b'\x03' +TAG_HANDLE_FILEFORMAT = b'\x04' +TAG_HANDLE_SOFAR = b'\x08' +TAG_HANDLE_GAP_START = b'\x09' +TAG_HANDLE_GAP_END = b'\x0a' +TAG_HANDLE_TEMP_NAME = b'\x12' +TAG_HANDLE_PAUSED = b'\x14' +TAG_HANDLE_PRIORITY = b'\x18' class MetFile: """Class designed to hold the data of a .part.met file.""" @@ -39,7 +39,7 @@ class MetFile: # a .part file must exist, even if it's empty. The same doesn't apply for new overnet. self.version = 225; self.modDate = 0; - self.fileID = '\0' * 16; + self.fileID = b'\0' * 16 return; header_struct = "