I am downloading torrents using libtorrent. The torrents have different download locations (save_path). I wish to move a downloaded torrent to new location after it finishes downloading. New location depends on pre-existing save_path.
ses = lt.session()
downloads=[]
.
.
params = {"save_path": "some/path"}
downloads.append(lt.add_magnet_uri(ses, magnet_link, params))
.
.
.
for index, download in enumerate(downloads[:]):
if not download.is_seed():
s = download.status()
/....DO SOMETHING..../
else:
ses.remove_torrent(download)
downloads.remove(download)
#path of downloaded file
#download.status().save_path
/...MOVE FILES TO NEW LOCATION.../
print(download.name(), "complete")
- How do I get save_path of downloaded torrent DONE
- How do I move downloaded files