From 67cefb12114ee8ce87190d8132c29ab14d053ea3 Mon Sep 17 00:00:00 2001 From: bendikro Date: Sun, 24 Jan 2016 13:31:06 +0100 Subject: [PATCH] [Core] Add finished_time to torrent status --- deluge/core/torrent.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index acdc63260..7fa3d0f0b 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -979,6 +979,8 @@ class Torrent(object): """Creates the functions for getting torrent status""" self.status_funcs = { "active_time": lambda: self.status.active_time, + "seeding_time": lambda: self.status.seeding_time, + "finished_time": lambda: self.status.finished_time, "all_time_download": lambda: self.status.all_time_download, "storage_mode": lambda: self.status.storage_mode.name.split("_")[2], # sparse, allocate or compact "distributed_copies": lambda: max(0.0, self.status.distributed_copies), @@ -1008,7 +1010,6 @@ class Torrent(object): "remove_at_ratio": lambda: self.options["remove_at_ratio"], "save_path": lambda: self.options["download_location"], # Deprecated, use download_location "download_location": lambda: self.options["download_location"], - "seeding_time": lambda: self.status.seeding_time, "seeds_peers_ratio": lambda: -1.0 if self.status.num_incomplete == 0 else ( # Use -1.0 to signify infinity self.status.num_complete / self.status.num_incomplete), "seed_rank": lambda: self.status.seed_rank,