mirror of https://github.com/aria2/aria2
Merge branch 'RoToRx88-master'
commit
af107b85c7
|
@ -124,7 +124,8 @@ void printSizeProgress(ColorizedStream& o,
|
||||||
o << sizeFormatter(rg->getCompletedLength()) << "B/"
|
o << sizeFormatter(rg->getCompletedLength()) << "B/"
|
||||||
<< sizeFormatter(rg->getTotalLength()) << "B";
|
<< sizeFormatter(rg->getTotalLength()) << "B";
|
||||||
if (rg->getTotalLength() > 0) {
|
if (rg->getTotalLength() > 0) {
|
||||||
o << "(" << 100 * rg->getCompletedLength() / rg->getTotalLength() << "%)";
|
o << colors::cyan << "(" << 100 * rg->getCompletedLength() / rg->getTotalLength() << "%)";
|
||||||
|
o << colors::clear;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -138,11 +139,11 @@ void printProgressCompact(ColorizedStream& o, const DownloadEngine* e,
|
||||||
NetStat& netstat = e->getRequestGroupMan()->getNetStat();
|
NetStat& netstat = e->getRequestGroupMan()->getNetStat();
|
||||||
int dl = netstat.calculateDownloadSpeed();
|
int dl = netstat.calculateDownloadSpeed();
|
||||||
int ul = netstat.calculateUploadSpeed();
|
int ul = netstat.calculateUploadSpeed();
|
||||||
o << "[DL:" << colors::green << sizeFormatter(dl) << "B" << colors::clear;
|
o << colors::magenta << "[" << colors::clear << "DL:" << colors::green << sizeFormatter(dl) << "B" << colors::clear;
|
||||||
if (ul) {
|
if (ul) {
|
||||||
o << " UL:" << colors::cyan << sizeFormatter(ul) << "B" << colors::clear;
|
o << " UL:" << colors::cyan << sizeFormatter(ul) << "B" << colors::clear;
|
||||||
}
|
}
|
||||||
o << "]";
|
o << colors::magenta << "]" << colors::clear;
|
||||||
}
|
}
|
||||||
|
|
||||||
const RequestGroupList& groups = e->getRequestGroupMan()->getRequestGroups();
|
const RequestGroupList& groups = e->getRequestGroupMan()->getRequestGroups();
|
||||||
|
@ -152,9 +153,9 @@ void printProgressCompact(ColorizedStream& o, const DownloadEngine* e,
|
||||||
++i, ++cnt) {
|
++i, ++cnt) {
|
||||||
const std::shared_ptr<RequestGroup>& rg = *i;
|
const std::shared_ptr<RequestGroup>& rg = *i;
|
||||||
TransferStat stat = rg->calculateStat();
|
TransferStat stat = rg->calculateStat();
|
||||||
o << "[#" << GroupId::toAbbrevHex(rg->getGID()) << " ";
|
o << colors::magenta << "[" << colors::clear << "#" << GroupId::toAbbrevHex(rg->getGID()) << " ";
|
||||||
printSizeProgress(o, rg, stat, sizeFormatter);
|
printSizeProgress(o, rg, stat, sizeFormatter);
|
||||||
o << "]";
|
o << colors::magenta << "]" << colors::clear;
|
||||||
}
|
}
|
||||||
if (cnt < groups.size()) {
|
if (cnt < groups.size()) {
|
||||||
o << "(+" << groups.size() - cnt << ")";
|
o << "(+" << groups.size() - cnt << ")";
|
||||||
|
@ -172,7 +173,7 @@ void printProgress(ColorizedStream& o, const std::shared_ptr<RequestGroup>& rg,
|
||||||
eta =
|
eta =
|
||||||
(rg->getTotalLength() - rg->getCompletedLength()) / stat.downloadSpeed;
|
(rg->getTotalLength() - rg->getCompletedLength()) / stat.downloadSpeed;
|
||||||
}
|
}
|
||||||
o << "[#" << GroupId::toAbbrevHex(rg->getGID()) << " ";
|
o << colors::magenta << "[" << colors::clear << "#" << GroupId::toAbbrevHex(rg->getGID()) << " ";
|
||||||
printSizeProgress(o, rg, stat, sizeFormatter);
|
printSizeProgress(o, rg, stat, sizeFormatter);
|
||||||
o << " CN:" << rg->getNumConnection();
|
o << " CN:" << rg->getNumConnection();
|
||||||
#ifdef ENABLE_BITTORRENT
|
#ifdef ENABLE_BITTORRENT
|
||||||
|
@ -195,7 +196,7 @@ void printProgress(ColorizedStream& o, const std::shared_ptr<RequestGroup>& rg,
|
||||||
if (eta > 0) {
|
if (eta > 0) {
|
||||||
o << " ETA:" << colors::yellow << util::secfmt(eta) << colors::clear;
|
o << " ETA:" << colors::yellow << util::secfmt(eta) << colors::clear;
|
||||||
}
|
}
|
||||||
o << "]";
|
o << colors::magenta << "]" << colors::clear;
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue