mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
- Improved ETA calculation code a little and fixed a little typo in the code
- Updated TODO (waiting for a bug fix in libtorrent)
This commit is contained in:
parent
f754e34e35
commit
48f5436f6f
2 changed files with 7 additions and 6 deletions
1
TODO
1
TODO
|
@ -57,6 +57,7 @@
|
||||||
- Translations update (IN PROGRESS)
|
- Translations update (IN PROGRESS)
|
||||||
- add qt4-qtconfig as package dependency
|
- add qt4-qtconfig as package dependency
|
||||||
- use new sparse mode
|
- use new sparse mode
|
||||||
|
- wait for Ticket #182 Fix
|
||||||
|
|
||||||
rc4->rc5 changelog:
|
rc4->rc5 changelog:
|
||||||
- BUGFIX: Now filtered don't appear on hard drive anymore (libtorrent >= r1659)
|
- BUGFIX: Now filtered don't appear on hard drive anymore (libtorrent >= r1659)
|
||||||
|
|
|
@ -144,12 +144,12 @@ void bittorrent::updateETAs() {
|
||||||
if(h.is_paused()) continue;
|
if(h.is_paused()) continue;
|
||||||
QString hash = h.hash();
|
QString hash = h.hash();
|
||||||
QList<qlonglong> listEtas = ETAstats.value(hash, QList<qlonglong>());
|
QList<qlonglong> listEtas = ETAstats.value(hash, QList<qlonglong>());
|
||||||
|
// XXX: We can still get an overflow if remaining file size is approximately
|
||||||
|
// 8.38*10^5 TiB (let's assume this can't happen)
|
||||||
|
if(h.download_payload_rate() > 0.1) {
|
||||||
if(listEtas.size() == ETAS_MAX_VALUES) {
|
if(listEtas.size() == ETAS_MAX_VALUES) {
|
||||||
listEtas.removeFirst();
|
listEtas.removeFirst();
|
||||||
}
|
}
|
||||||
// XXX: We can still get an overflow if remaining file size is approximately
|
|
||||||
// 8.38*10^5 TiB (lets assume this can't happen)
|
|
||||||
if(h.download_payload_rate() > 0.1) {
|
|
||||||
listEtas << (qlonglong)((h.actual_size()-h.total_wanted_done())/(double)h.download_payload_rate());
|
listEtas << (qlonglong)((h.actual_size()-h.total_wanted_done())/(double)h.download_payload_rate());
|
||||||
ETAstats[hash] = listEtas;
|
ETAstats[hash] = listEtas;
|
||||||
qlonglong moy = 0;
|
qlonglong moy = 0;
|
||||||
|
@ -162,9 +162,9 @@ void bittorrent::updateETAs() {
|
||||||
}
|
}
|
||||||
ETAs[hash] = moy;
|
ETAs[hash] = moy;
|
||||||
} else {
|
} else {
|
||||||
// Speed is too low, we don't want overflow.
|
// Speed is too low, we don't want an overflow.
|
||||||
if(ETAstats.contains(hash)) {
|
if(ETAstats.contains(hash)) {
|
||||||
ETAs.remove(hash);
|
ETAstats.remove(hash);
|
||||||
}
|
}
|
||||||
if(ETAs.contains(hash)) {
|
if(ETAs.contains(hash)) {
|
||||||
ETAs.remove(hash);
|
ETAs.remove(hash);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue