Author: andar

Revision: 6058

Log:
        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.

Diff:
Modified: branches/1.2_RC/ChangeLog
===================================================================
--- branches/1.2_RC/ChangeLog   2009-12-23 01:34:58 UTC (rev 6057)
+++ branches/1.2_RC/ChangeLog   2009-12-23 18:44:00 UTC (rev 6058)
@@ -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

Modified: branches/1.2_RC/deluge/core/torrent.py
===================================================================
--- branches/1.2_RC/deluge/core/torrent.py      2009-12-23 01:34:58 UTC (rev 
6057)
+++ branches/1.2_RC/deluge/core/torrent.py      2009-12-23 18:44:00 UTC (rev 
6058)
@@ -411,9 +411,7 @@
         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:

Modified: trunk/deluge/core/torrent.py
===================================================================
--- trunk/deluge/core/torrent.py        2009-12-23 01:34:58 UTC (rev 6057)
+++ trunk/deluge/core/torrent.py        2009-12-23 18:44:00 UTC (rev 6058)
@@ -411,9 +411,7 @@
         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:


--

You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.


Reply via email to