- BUGFIX: Fixed an ETA calculation problem when the torrent has filtered files

This commit is contained in:
Christophe Dumez 2007-10-10 19:10:34 +00:00
parent 0a0c1f3529
commit 0245bbf5ab
5 changed files with 7 additions and 6 deletions

3
TODO
View File

@ -60,4 +60,5 @@
rc4->rc5 changelog:
- BUGFIX: Now filtered don't appear on hard drive anymore (libtorrent >= r1659)
- BUGFIX: AddInPause setting doesn't pause downloads on startup anymore
- BUGFIX: AddInPause setting doesn't pause downloads on startup anymore
- BUGFIX: Fixed an ETA calculation problem when the torrent has filtered files

View File

@ -148,7 +148,7 @@ void bittorrent::updateETAs() {
listEtas.removeFirst();
}
if(h.download_payload_rate()) {
listEtas << (qlonglong)((h.actual_size()-h.total_done())/(double)h.download_payload_rate());
listEtas << (qlonglong)((h.actual_size()-h.total_wanted_done())/(double)h.download_payload_rate());
ETAstats[hash] = listEtas;
qlonglong moy = 0;
qlonglong val;

View File

@ -79,9 +79,9 @@ bool QTorrentHandle::is_paused() const {
// return h.get_torrent_info().total_size();
// }
size_type QTorrentHandle::total_done() const {
size_type QTorrentHandle::total_wanted_done() const {
Q_ASSERT(h.is_valid());
return h.status().total_done;
return h.status().total_wanted_done;
}
float QTorrentHandle::download_payload_rate() const {

View File

@ -59,7 +59,7 @@ class QTorrentHandle {
bool is_paused() const;
bool has_filtered_pieces() const;
// size_type total_size() const;
size_type total_done() const;
size_type total_wanted_done() const;
float download_payload_rate() const;
float upload_payload_rate() const;
int num_peers() const;

View File

@ -30,7 +30,7 @@ contains(DEBUG_MODE, 0){
# For libtorrent stuff
# (comment this if you are using libtorrent with debug enabled)
DEFINES += NDEBUG
#DEFINES += NDEBUG
# Install