mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-10-07 03:18:49 +00:00
show torrent availability on remote peer in progress field
This commit is contained in:
@@ -385,7 +385,8 @@ namespace torrents
|
||||
peer["clientIsIntersted"] = it->IsInterested ();
|
||||
peer["peerIsInterested"] = it->IsRemoteInterested ();
|
||||
peer["flagStr"] = flags;
|
||||
peer["progress"] = torrent->GetLength () ? ((float)it->GetDownloaded ())/(float)(torrent->GetLength ()) : 1.0;
|
||||
const auto& remoteBitfield = it->GetRemoteBitfield ();
|
||||
peer["progress"] = remoteBitfield.size () ? ((float)remoteBitfield.count ())/((float)remoteBitfield.size ()) : 0.0;
|
||||
peers.push_back (peer);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user