From c443193ce046555e13702de83077dd583c693f61 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 30 Dec 2014 16:59:37 +0000 Subject: [PATCH] add option to client_test to remove web seeds --- examples/client_test.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/examples/client_test.cpp b/examples/client_test.cpp index 3e914bfe6..e94c4703e 100644 --- a/examples/client_test.cpp +++ b/examples/client_test.cpp @@ -1672,6 +1672,23 @@ int main(int argc, char* argv[]) if (c == 'q') break; + if (c == 'W' && h.is_valid()) + { + std::set seeds = h.url_seeds(); + for (std::set::iterator i = seeds.begin() + , end(seeds.end()); i != end; ++i) + { + st.handle.remove_url_seed(*i); + } + + seeds = h.http_seeds(); + for (std::set::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"