How do you get the total size of the files in a torrent?
And is there any way to get the number of files in a torrent and the size of each one?
h = ses.add_torrent(params)
s = h.status()
while (not h.is_seed()):
print s.total_wanted # prints total size wanted after meta data is obtained, before that 0 is printed.
If you take a look at the C++ API you will find that the torrent-info and file_iterator methods a little down the page give you the information you are looking for. The python bindings section states:
The python interface is nearly identical to the C++ interface.
So you should be able to get at these methods with a little effort.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With