mirror of https://github.com/aria2/aria2
pull/1/head
parent
4b6181b6d1
commit
8ad0037ee2
|
@ -218,9 +218,11 @@ void TorrentMan::completePiece(const Piece& piece) {
|
|||
if(Piece::isNull(piece)) {
|
||||
return;
|
||||
}
|
||||
if(!hasPiece(piece.getIndex())) {
|
||||
addDownloadedSize(piece.getLength());
|
||||
}
|
||||
bitfield->setBit(piece.getIndex());
|
||||
bitfield->unsetUseBit(piece.getIndex());
|
||||
addDownloadedSize(piece.getLength());
|
||||
deleteUsedPiece(piece);
|
||||
if(!isEndGame()) {
|
||||
reduceUsedPieces(100);
|
||||
|
|
|
@ -51,7 +51,7 @@ bool TrackerInitCommand::execute() {
|
|||
"port="+Util::itos(e->torrentMan->getPort())+"&"+
|
||||
"uploaded="+Util::llitos(e->torrentMan->getUploadedSize())+"&"+
|
||||
"downloaded="+Util::llitos(e->torrentMan->getDownloadedSize())+"&"+
|
||||
"left="+Util::llitos(e->torrentMan->totalSize-e->torrentMan->getDownloadedSize())+"&"+
|
||||
"left="+(e->torrentMan->downloadComplete() ? "0" : Util::llitos(e->torrentMan->totalSize-e->torrentMan->getDownloadedSize()))+"&"+
|
||||
"compact=1";
|
||||
if(!event.empty()) {
|
||||
url += string("&")+"event="+event;
|
||||
|
|
Loading…
Reference in New Issue