rakshasa / rtorrent

rTorrent BitTorrent client
https://github.com/rakshasa/rtorrent/wiki
GNU General Public License v2.0
4.15k stars 414 forks source link

How to stop downloading of torrent but still uploading it? #361

Open xbtowbw opened 8 years ago

xbtowbw commented 8 years ago

To optimize my download bandwidth I would like to stop certain torrents from downloading. But they should still be uploading to other clients. What command should be used to stop downloading but still seeding? Please mention shortcut for ncurse interface and ALSO RPC command. I use newest rTorrent 0.9.6/0.13.6.

Thanks for any help!

xbtowbw commented 8 years ago

Currently we use d.pause to stop and d.resume to continue. But d.pause seems to also pause upload. What could be used instead which does not interrupt upload?

pyroscope commented 8 years ago

Set the priority of all files to off.

PS: there is a mailing list for that type of questions.

xbtowbw commented 8 years ago

Thanks for the help. It works when we set priority of all files to off using ncurse interface (pressing * on keyboard in File list). But it does NOT work if we do it via RPC. We use f.multicall with the torrent hash and then f.set_priority=0. In the ncurse interface we see that the files change to off as well but they do NOT stop. Kind of strange. Is that a bug?

chros73 commented 8 years ago

Thanks for the info, pyroscope, once I would have needed this feature and I didn't know how to do it.

xbtowbw commented 8 years ago

Does anybody know why it does not work via RPC?

pyroscope commented 8 years ago

Because you did not read the docs (aka source). Hint: d.update_priorities

xbtowbw commented 8 years ago

Well an other example of very good documentation... Do you know why it takes so long for a torrent to start downloading again after switching from file priorities from off to high? It can take up to 10 minutes till rtorrent starts downloading again. Why is that?

pyroscope commented 8 years ago

See #338

This can likely be closed.

rakshasa commented 8 years ago

There's two different C++ classes for peer connections, in this case 'peer_connection_leech.cc' and a seeding class. (actually uses templates, but still the same, see 'peer_factory.cc')

What you probably want is for libtorrent to have a mode where a leaching torrent acts like a seeding torrent in that it only creates seeding peer connections.

Make a patch and I'll merge it if it is good enough. Probably would be a call to something like 'd.foo_bar_seeding'.