Ticket #2281: 0001-Add-total_wanted_done-to-core-and-both-uis.patch

File 0001-Add-total_wanted_done-to-core-and-both-uis.patch, 4.0 KB (added by Tydus, 12 years ago)
  • deluge/core/torrent.py

    From bfcc9d3ada868953bf1b428c94350b2abf6cf0e0 Mon Sep 17 00:00:00 2001
    From: Tydus <Tydus@Tydus.org>
    Date: Tue, 19 Feb 2013 09:30:17 +0800
    Subject: [PATCH] Add total_wanted_done to core and both uis
    
    ---
     deluge/core/torrent.py                   | 1 +
     deluge/ui/console/modes/alltorrents.py   | 2 ++
     deluge/ui/console/modes/column.py        | 1 +
     deluge/ui/console/modes/torrentdetail.py | 2 +-
     deluge/ui/gtkui/torrentview.py           | 3 +++
     5 files changed, 8 insertions(+), 1 deletion(-)
    
    diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py
    index 6336d7a..bfa09ca 100644
    a b def _create_status_funcs(self):  
    750750            "total_seeds":            lambda: self.status.num_complete,
    751751            "total_uploaded":         lambda: self.status.all_time_upload,
    752752            "total_wanted":           lambda: self.status.total_wanted,
     753            "total_wanted_done":      lambda: self.status.total_wanted_done,
    753754            "tracker":                lambda: self.status.current_tracker,
    754755            "trackers":               lambda: self.trackers,
    755756            "tracker_status":         lambda: self.tracker_status,
  • deluge/ui/console/modes/alltorrents.py

    diff --git a/deluge/ui/console/modes/alltorrents.py b/deluge/ui/console/modes/alltorrents.py
    index 3dcb30c..6a2e775 100644
    a b class FILTER:  
    234234
    235235column_names_to_state_keys = {
    236236    "size": "total_wanted",
     237    "done": "total_wanted_done",
    237238    "downspeed": "download_payload_rate",
    238239    "upspeed": "upload_payload_rate",
    239240    "seeders": "num_seeds",
    class FILTER:  
    250251
    251252reverse_sort_fields = [
    252253    "total_wanted",
     254    "total_wanted_done",
    253255    "download_payload_rate",
    254256    "upload_payload_rate",
    255257    "num_seeds",
  • deluge/ui/console/modes/column.py

    diff --git a/deluge/ui/console/modes/column.py b/deluge/ui/console/modes/column.py
    index 26d10f6..962ae95 100644
    a b def format_queue(qnum):  
    5151    "#":(("queue",),format_queue),
    5252    "Name":(("name",),None),
    5353    "Size":(("total_wanted",),deluge.common.fsize),
     54    "Done":(("total_wanted_done",),deluge.common.fsize),
    5455    "State":(("state",),None),
    5556    "Progress":(("progress",),format_utils.format_progress),
    5657    "Seeders":(("num_seeds","total_seeds"),format_utils.format_seeds_peers),
  • deluge/ui/console/modes/torrentdetail.py

    diff --git a/deluge/ui/console/modes/torrentdetail.py b/deluge/ui/console/modes/torrentdetail.py
    index 4252c4e..a19064d 100644
    a b def __init__(self, alltorrentmode, torrentid, stdscr, console_config, encoding=N  
    108108                             "num_seeds","total_seeds","num_peers","total_peers", "active_time",
    109109                             "seeding_time","time_added","distributed_copies", "num_pieces",
    110110                             "piece_length","save_path","file_progress","file_priorities","message",
    111                              "total_wanted", "tracker_host", "owner"]
     111                             "total_wanted", "total_wanted_done", "tracker_host", "owner"]
    112112
    113113        self.file_list = None
    114114        self.current_file = None
  • deluge/ui/gtkui/torrentview.py

    diff --git a/deluge/ui/gtkui/torrentview.py b/deluge/ui/gtkui/torrentview.py
    index cdfbcc8..af1f780 100644
    a b def __init__(self):  
    365365        self.add_func_column(_("Size"), listview.cell_data_size,
    366366                             [gobject.TYPE_UINT64],
    367367                             status_field=["total_wanted"])
     368        self.add_func_column(_("Done"), listview.cell_data_size,
     369                             [gobject.TYPE_UINT64],
     370                             status_field=["total_wanted_done"])
    368371        self.add_func_column(_("Downloaded"), listview.cell_data_size,
    369372                             [gobject.TYPE_UINT64],
    370373                             status_field=["all_time_download"], default=False)