Torrent holds information about torrents added to the libtorrent session.
-
apply_options()
- Applies the per-torrent options that are set.
-
connect_peer(ip, port)
- adds manual peer
-
delete_fastresume()
- Deletes the .fastresume file
-
delete_torrentfile()
- Deletes the .torrent file in the state
-
force_reannounce()
- Force a tracker reannounce
-
force_recheck()
- Forces a recheck of the torrents pieces
-
get_eta()
- Returns the ETA in seconds for this torrent
-
get_file_progress()
- Returns the file progress as a list of floats.. 0.0 -> 1.0
-
get_files()
- Returns a list of files this torrent contains
-
get_options()
-
get_peers()
- Returns a list of peers and various information about them
-
get_queue_position()
- Returns the torrents queue position
-
get_ratio()
- Returns the ratio for this torrent
-
get_status(keys)
- Returns the status of the torrent based on the keys provided
-
get_tracker_host()
- Returns just the hostname of the currently connected tracker
if no tracker is connected, it uses the 1st tracker.
-
move_storage(dest)
- Move a torrent’s storage location
-
pause()
- Pause this torrent
-
rename_files(filenames)
- Renames files in the torrent. ‘filenames’ should be a list of
(index, filename) pairs.
-
rename_folder(folder, new_folder)
- Renames a folder within a torrent. This basically does a file rename
on all of the folders children.
-
resume()
- Resumes this torrent
-
save_resume_data()
- Signals libtorrent to build resume data for this torrent, it gets
returned in a libtorrent alert
-
scrape_tracker()
- Scrape the tracker
-
set_auto_managed(auto_managed)
-
set_file_priorities(file_priorities)
-
set_max_connections(max_connections)
-
set_max_download_speed(m_down_speed)
-
set_max_upload_slots(max_slots)
-
set_max_upload_speed(m_up_speed)
-
set_move_completed(move_completed)
-
set_move_completed_path(move_completed_path)
-
set_options(options)
-
set_prioritize_first_last(prioritize)
-
set_remove_at_ratio(remove_at_ratio)
-
set_save_path(save_path)
-
set_state(state)
- Accepts state strings, ie, “Paused”, “Seeding”, etc.
-
set_status_message(message)
-
set_stop_at_ratio(stop_at_ratio)
-
set_stop_ratio(stop_ratio)
-
set_tracker_status(status)
- Sets the tracker status
-
set_trackers(trackers)
- Sets trackers
-
update_state()
- Updates the state based on what libtorrent’s state for the torrent is
-
write_resume_data(resume_data)
- Writes the .fastresume file for the torrent
-
write_torrentfile()
- Writes the torrent file