Reputation: 9
To begin with, English is not my native language, so it's hard for me to read the libtorrent documentation and all this question has been translated. I ask you to answer these questions, if you know any of them, answer only him. I am using libtorrent 2.0.7 and Python 3.8 It is not necessary to answer questions in python, I will try to figure it out even if you answer in c++
At the moment when the torrent is not loaded yet. How do I get all the files to be uploaded? At the moment when the torrent is loaded. How do I get the path to the files that were uploaded? (I found a similar question, but its answer stopped working because of deprecated)
I'm trying to use
handle.get_torrent_info()
to answer point 1, but returns
DeprecationWarning: get_torrent_info() is deprecated
I tried to look in the source file, but it doesn't say what to use instead of this function. Do you know?
session.download_rate_limit()
in its parameters , but when using it, it returns
DeprecationWarning: download_rate_limit() is deprecated.
I also tried to look in the documentation, but I didn't find it. I also didn't figure out what parameters it accepts, I tried int, but it returned an error. As in point 2, it is not written what to use instead of the outdated function. Do you know?
Upvotes: 0
Views: 338
Reputation: 9
I found the answer to the 1st and 2nd question:
test = handle.status()
for i in range(test.torrent_file.files().num_files()):
print(test.torrent_file.files().file_path(i))
Upvotes: 0