diff options
author | Andrew Resch <andrewresch@gmail.com> | 2009-12-23 18:44:00 +0000 |
---|---|---|
committer | Andrew Resch <andrewresch@gmail.com> | 2009-12-23 18:44:00 +0000 |
commit | ac857eaef7c72662e03f5b84ac46103154cb8c8b (patch) | |
tree | c5a4755d453c9a541619f38de03d057d8b99d19a | |
parent | 886f2d86821e3777bcbedbe1a1bf34fc77168927 (diff) | |
download | deluge-ac857eaef7c72662e03f5b84ac46103154cb8c8b.tar.gz deluge-ac857eaef7c72662e03f5b84ac46103154cb8c8b.tar.bz2 deluge-ac857eaef7c72662e03f5b84ac46103154cb8c8b.zip |
Change share ratio calculation to use the total done instead of the all time downloaded value. This change will make the share ratio calculation not use data downloaded in failed hash checks.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | deluge/core/torrent.py | 4 |
2 files changed, 4 insertions, 3 deletions
@@ -3,6 +3,9 @@ * Fix file renaming * Fix tracker host filtering (Closes #1106) * Fix exceptions when gettext/locale cannot be initialized properly + * Change share ratio calculation to use the total done instead of the all time + downloaded value. This change will make the share ratio calculation not + use data downloaded in failed hash checks. ==== GtkUI ==== * Fix #1104, #735 use path.utf-8 if available diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index 3f03763ad..7cddf616c 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -411,9 +411,7 @@ class Torrent: else: status = self.status - if status.all_time_download > 0: - downloaded = status.all_time_download - elif status.total_done > 0: + if status.total_done > 0: # We use 'total_done' if the downloaded value is 0 downloaded = status.total_done else: |