rtorrent_rpc.helper

add_completed_resume_file(base_save_path: Path, torrent_content: bytes) bytes[source]

update torrent content, add resume data to torrent.

Warning

this may cause rtorrent into a invalid state and causing bugs, use at your own risk.

add_fast_resume_file(base_save_path: Path, torrent_content: bytes) bytes[source]

update torrent content, add resume data to torrent, skip checking file exists on disk.

Warning

this may cause rtorrent into a invalid state and causing bugs, use at your own risk.

get_torrent_info_hash(content: bytes) str[source]

get torrent info_hash in low case string

parse_tags(s: str) set[str][source]

ruTorrent compatibility method to parse d.custom1 as tags

parse_comment(s: str) str[source]

ruTorrent compatibility method to parse d.custom2 as torrent comment