diff --git a/ChangeLog b/ChangeLog index 57d449718..f79bbacf6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ Deluge 1.1.0 - "" (In Development) * Implement #368 add torrents by infohash/magnet uri (trackerless torrents) * Remove remaining gtk functions in common * Tracker icons. + * Add ETA for torrents with stop at seed ratio set GtkUI: * Add peer progress to the peers tab diff --git a/deluge/core/core.py b/deluge/core/core.py index c348f0f1c..63bf890f9 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -484,11 +484,7 @@ class Core( def export_get_torrent_status(self, torrent_id, keys): # Build the status dictionary - try: - status = self.torrents[torrent_id].get_status(keys) - except KeyError: - # The torrent_id is not found in the torrentmanager, so return None - return None + status = self.torrents[torrent_id].get_status(keys) # Get the leftover fields and ask the plugin manager to fill them leftover_fields = list(set(keys) - set(status.keys())) @@ -496,7 +492,7 @@ class Core( status.update(self.plugins.get_status(torrent_id, leftover_fields)) return status - def export_get_torrents_status(self, filter_dict, keys ): + def export_get_torrents_status(self, filter_dict, keys): """ returns all torrents , optionally filtered by filter_dict. """ @@ -506,7 +502,7 @@ class Core( # Get the torrent status for each torrent_id for torrent_id in torrent_ids: status_dict[torrent_id] = self.export_get_torrent_status(torrent_id, keys) - # Emit the torrent_status signal to the clients + return status_dict def export_get_filter_tree(self , show_zero_hits=True, hide_cat=None): diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index 5e792bbf9..0fd09a54a 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -401,7 +401,7 @@ class Torrent: # We're a seed, so calculate the time to the 'stop_share_ratio' if not status.upload_payload_rate: return 0 - stop_ratio = self.config["stop_seed_ratio"] if self.config["stop_at_seed_ratio"] else self.options["stop_seed_ratio"] + stop_ratio = self.config["stop_seed_ratio"] if self.config["stop_seed_at_ratio"] else self.options["stop_seed_ratio"] return ((status.all_time_download * stop_ratio) - status.all_time_upload) / status.upload_payload_rate