mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 01:33:07 -07:00
- BUGFIX: Do not store and calculate ETA values for paused torrents
This commit is contained in:
parent
b5ccf05541
commit
b582ec9480
2 changed files with 6 additions and 2 deletions
|
@ -109,6 +109,7 @@ void bittorrent::updateETAs() {
|
|||
foreach(hash, unfinishedTorrents) {
|
||||
QTorrentHandle h = getTorrentHandle(hash);
|
||||
if(h.is_valid()) {
|
||||
if(h.is_paused()) continue;
|
||||
QString hash = h.hash();
|
||||
QList<qlonglong> listEtas = ETAstats.value(hash, QList<qlonglong>());
|
||||
if(listEtas.size() == ETAS_MAX_VALUES) {
|
||||
|
@ -272,6 +273,9 @@ bool bittorrent::pauseTorrent(QString hash) {
|
|||
paused_file.open(QIODevice::WriteOnly | QIODevice::Text);
|
||||
paused_file.close();
|
||||
}
|
||||
// Remove it from ETAs hash tables
|
||||
ETAstats.remove(hash);
|
||||
ETAs.remove(hash);
|
||||
return change;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue