MFAshby / pybittorrent

Bittorrent client & tracker, written in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support multiple file mode when creating meta info (.torrent) files

MFAshby opened this issue · comments

Currently only supports single file torrents:

Info in Multiple File Mode
For the case of the multi-file mode, the info dictionary contains the following structure:
name: the file path of the directory in which to store all the files. This is purely advisory. (string)
files: a list of dictionaries, one for each file. Each dictionary in this list contains the following keys:
length: length of the file in bytes (integer)
md5sum: (optional) a 32-character hexadecimal string corresponding to the MD5 sum of the file. This is not used by BitTorrent at all, but it is included by some programs for greater compatibility.
path: a list containing one or more string elements that together represent the path and filename. Each element in the list corresponds to either a directory name or (in the case of the final element) the filename. For example, a the file "dir1/dir2/file.ext" would consist of three string elements: "dir1", "dir2", and "file.ext". This is encoded as a bencoded list of strings such as l4:dir14:dir28:file.exte