Fix #545 use proper values in ratio calculation
This commit is contained in:
parent
bdbed9f893
commit
cb19d71b7d
|
@ -410,8 +410,8 @@ class Torrent:
|
|||
else:
|
||||
status = self.status
|
||||
|
||||
up = self.total_uploaded + status.total_payload_upload
|
||||
down = status.total_done
|
||||
up = status.all_time_upload
|
||||
down = status.all_time_download
|
||||
|
||||
# Convert 'up' and 'down' to floats for proper calculation
|
||||
up = float(up)
|
||||
|
@ -538,11 +538,12 @@ class Torrent:
|
|||
"distributed_copies": distributed_copies,
|
||||
"total_done": self.status.total_done,
|
||||
"total_uploaded": self.status.all_time_upload,
|
||||
"all_time_download": self.status.all_time_download,
|
||||
"state": self.state,
|
||||
"paused": self.status.paused,
|
||||
"progress": progress,
|
||||
"next_announce": self.status.next_announce.seconds,
|
||||
"total_payload_download": self.status.all_time_download,
|
||||
"total_payload_download": self.status.total_payload_download,
|
||||
"total_payload_upload": self.status.total_payload_upload,
|
||||
"download_payload_rate": self.status.download_payload_rate,
|
||||
"upload_payload_rate": self.status.upload_payload_rate,
|
||||
|
|
|
@ -71,7 +71,7 @@ class StatisticsTab(Tab):
|
|||
self.label_widgets = [
|
||||
(glade.get_widget("summary_pieces"), fpeer_size_second, ("num_pieces", "piece_length")),
|
||||
(glade.get_widget("summary_availability"), fratio, ("distributed_copies",)),
|
||||
(glade.get_widget("summary_total_downloaded"), fpeer_sized, ("total_done", "total_payload_download")),
|
||||
(glade.get_widget("summary_total_downloaded"), fpeer_sized, ("all_time_download", "total_payload_download")),
|
||||
(glade.get_widget("summary_total_uploaded"), fpeer_sized, ("total_uploaded", "total_payload_upload")),
|
||||
(glade.get_widget("summary_download_speed"), fspeed, ("download_payload_rate", "max_download_speed")),
|
||||
(glade.get_widget("summary_upload_speed"), fspeed, ("upload_payload_rate", "max_upload_speed")),
|
||||
|
@ -101,7 +101,7 @@ class StatisticsTab(Tab):
|
|||
|
||||
# Get the torrent status
|
||||
status_keys = ["progress", "num_pieces", "piece_length",
|
||||
"distributed_copies", "total_done", "total_payload_download",
|
||||
"distributed_copies", "all_time_download", "total_payload_download",
|
||||
"total_uploaded", "total_payload_upload", "download_payload_rate",
|
||||
"upload_payload_rate", "num_peers", "num_seeds", "total_peers",
|
||||
"total_seeds", "eta", "ratio", "next_announce",
|
||||
|
|
Loading…
Reference in New Issue