From 0ba87b424c6781beefa450696042bf4e9abeb64b Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sun, 29 Oct 2017 12:36:15 +0000 Subject: [PATCH] Revert "[#2848|Core] Fix incorrect share ratio in torrent status" This reverts commit 7b87a93862bae5bcb53d4134a111a308ec36f9e8. After further discussion in the ticket this change is undesired. > I wrongly assumed that private trackers will count how many bytes you > download but they don't, they track how many parts(or chunks?) you > have, when you announce it. So using total_done is fine, no change > needed. > Checking for private flag and using total_wanted_done for public > enables users to be a bit more selfish. They can start a torrent, > let it run for a bit then deselect the files they don't want and > only upload enough to make up for what they wanted to download. This > means they may upload less than they downloaded, hurting the swarm. > So I personally don't think this would be a good change. > Overall my suggestion is to close this as not a bug. --- deluge/core/torrent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index d5617317f..ac37dec36 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -716,7 +716,7 @@ class Torrent(object): """ if self.status.total_done > 0: - return self.status.all_time_upload / self.status.total_wanted_done + return self.status.all_time_upload / self.status.total_done else: return -1.0