def leech(torrentfilename): client = BittorrentClient() torrent = client.add_torrent(torrentfilename) torrent.strategy = torrentstrategy.quit_when_done(15) loop(client)
def seed(torrentfile, datafile): client = BittorrentClient(6882) torrent = client.add_torrent(torrentfile) torrent.load(datafile) torrent.tracker_update() loop(client)