mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-09 18:08:39 +00:00
Fix ratio calc
This commit is contained in:
parent
b142a1eaf9
commit
b077d5075a
1 changed files with 4 additions and 3 deletions
|
@ -418,9 +418,10 @@ class Torrent:
|
||||||
else:
|
else:
|
||||||
status = self.status
|
status = self.status
|
||||||
|
|
||||||
|
if status.all_time_download > 0:
|
||||||
downloaded = status.all_time_download
|
downloaded = status.all_time_download
|
||||||
|
elif status.total_done > 0:
|
||||||
# We use 'total_done' if the downloaded value is 0
|
# We use 'total_done' if the downloaded value is 0
|
||||||
if downloaded == 0 and status.total_done > 0:
|
|
||||||
downloaded = status.total_done
|
downloaded = status.total_done
|
||||||
else:
|
else:
|
||||||
# Return -1.0 to signify infinity
|
# Return -1.0 to signify infinity
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue