fix negative ratio bug. maybe :)
This commit is contained in:
parent
2bb0ec122e
commit
7c65bce6d8
|
@ -776,8 +776,8 @@ class Manager:
|
||||||
# Calculations
|
# Calculations
|
||||||
|
|
||||||
def calc_ratio(self, unique_ID, torrent_state):
|
def calc_ratio(self, unique_ID, torrent_state):
|
||||||
up = float(torrent_state['total_payload_upload'] + self.unique_IDs[unique_ID].uploaded_memory)
|
up = float((torrent_state['total_payload_upload'] / 1024) + (self.unique_IDs[unique_ID].uploaded_memory / 1024))
|
||||||
down = float(torrent_state["total_done"])
|
down = float(torrent_state["total_done"] / 1024)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
ret = float(up/down)
|
ret = float(up/down)
|
||||||
|
|
Loading…
Reference in New Issue