add option to client_test to remove web seeds

This commit is contained in:
Arvid Norberg 2014-12-30 16:59:37 +00:00
parent 7d53b7efd3
commit c443193ce0
1 changed files with 18 additions and 1 deletions

View File

@ -1672,6 +1672,23 @@ int main(int argc, char* argv[])
if (c == 'q') break;
if (c == 'W' && h.is_valid())
{
std::set<std::string> seeds = h.url_seeds();
for (std::set<std::string>::iterator i = seeds.begin()
, end(seeds.end()); i != end; ++i)
{
st.handle.remove_url_seed(*i);
}
seeds = h.http_seeds();
for (std::set<std::string>::iterator i = seeds.begin()
, end(seeds.end()); i != end; ++i)
{
st.handle.remove_http_seed(*i);
}
}
if (c == 'D' && h.is_valid())
{
torrent_status const& st = view.get_active_torrent();
@ -1809,7 +1826,7 @@ int main(int argc, char* argv[])
"[v] scrape [D] delete torrent and data\n"
"[r] force reannounce [R] save resume data for all torrents\n"
"[o] set piece deadlines (sequential dl) [P] toggle auto-managed\n"
"[k] toggle force-started\n"
"[k] toggle force-started [W] remove all web seeds\n"
"\n"
"DISPLAY OPTIONS\n"
"left/right arrow keys: select torrent filter\n"