mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-21 03:54:50 +00:00
Attempt to fix improper ratio.
This commit is contained in:
parent
bd57df9915
commit
488bbb0a53
1 changed files with 3 additions and 2 deletions
|
@ -1184,9 +1184,10 @@ likely the tracker did not responsd in utf-8."
|
|||
|
||||
def calc_ratio(self, unique_ID, torrent_state):
|
||||
try:
|
||||
up = float((self.unique_IDs[unique_ID].initial_uploaded_memory + self.get_core_torrent_state(unique_ID, False)['total_upload']) / 1024)
|
||||
except AttributeError:
|
||||
up = float((self.unique_IDs[unique_ID].uploaded_memory + self.get_core_torrent_state(unique_ID, False)['total_upload']) / 1024)
|
||||
except AttributeError:
|
||||
up = 0
|
||||
|
||||
down = float(torrent_state["total_done"] / 1024)
|
||||
try:
|
||||
ret = up/down
|
||||
|
|
Loading…
Add table
Reference in a new issue