diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py
index f9f80ca..467f869 100644
a
|
b
|
def get_status(self, keys, diff=False):
|
568 | 568 | if distributed_copies < 0: |
569 | 569 | distributed_copies = 0.0 |
570 | 570 | |
| 571 | # Calculate the seeds:peers ratio |
| 572 | if self.status.num_incomplete == 0: |
| 573 | # Use -1.0 to signify infinity |
| 574 | seeds_peers_ratio = -1.0 |
| 575 | else: |
| 576 | seeds_peers_ratio = self.status.num_complete / float(self.status.num_incomplete) |
| 577 | |
571 | 578 | #if you add a key here->add it to core.py STATUS_KEYS too. |
572 | 579 | full_status = { |
573 | 580 | "active_time": self.status.active_time, |
… |
… |
def get_status(self, keys, diff=False):
|
595 | 602 | "remove_at_ratio": self.options["remove_at_ratio"], |
596 | 603 | "save_path": self.options["download_location"], |
597 | 604 | "seeding_time": self.status.seeding_time, |
| 605 | "seeds_peers_ratio": seeds_peers_ratio, |
598 | 606 | "seed_rank": self.status.seed_rank, |
599 | 607 | "state": self.state, |
600 | 608 | "stop_at_ratio": self.options["stop_at_ratio"], |
diff --git a/deluge/ui/gtkui/torrentview.py b/deluge/ui/gtkui/torrentview.py
index bc1b908..c9ff32f 100644
a
|
b
|
def __init__(self):
|
214 | 214 | self.add_func_column(_("Peers"), listview.cell_data_peer, [int, int], |
215 | 215 | status_field=["num_peers", "total_peers"], |
216 | 216 | sort_func=seed_peer_column_sort) |
| 217 | self.add_func_column(_("Seeds/Peers"), listview.cell_data_ratio, [float], |
| 218 | status_field=["seeds_peers_ratio"]) |
217 | 219 | self.add_func_column(_("Down Speed"), listview.cell_data_speed, [float], |
218 | 220 | status_field=["download_payload_rate"]) |
219 | 221 | self.add_func_column(_("Up Speed"), listview.cell_data_speed, [float], |