back ported feature to expose which pieces have been verified in seed_mode and exposes it in client_test (initially implemented in the libtorrent_aio branch)
This commit is contained in:
@@ -1414,7 +1414,9 @@ int main(int argc, char* argv[])
|
||||
// is a somewhat expensive operation, don't do it by default for
|
||||
// all torrents
|
||||
handles[active_torrent] = handles[active_torrent].handle.status(
|
||||
torrent_handle::query_distributed_copies);
|
||||
torrent_handle::query_distributed_copies
|
||||
| torrent_handle::query_pieces
|
||||
| torrent_handle::query_verified_pieces);
|
||||
}
|
||||
|
||||
std::vector<feed_handle> feeds;
|
||||
@@ -1853,12 +1855,19 @@ int main(int argc, char* argv[])
|
||||
out += str;
|
||||
++lines_printed;
|
||||
|
||||
if (print_piece_bar && s.state != torrent_status::seeding)
|
||||
if (print_piece_bar && (s.state != torrent_status::seeding || s.seed_mode))
|
||||
{
|
||||
out += " ";
|
||||
out += piece_bar(s.pieces, terminal_width - 7);
|
||||
out += "\n";
|
||||
++lines_printed;
|
||||
if (s.seed_mode)
|
||||
{
|
||||
out += " ";
|
||||
out += piece_bar(s.verified_pieces, terminal_width - 7);
|
||||
out += "\n";
|
||||
++lines_printed;
|
||||
}
|
||||
}
|
||||
|
||||
if (s.state != torrent_status::queued_for_checking && s.state != torrent_status::checking_files)
|
||||
|
Reference in New Issue
Block a user