[WebUI][Console] Add missing columns and statuses

Rename 'Seeders' to 'Seeds'
Hide seconds from fdate unless wanted
'Last Seen Complete' renamed to 'Complete Seen'
Added columns and status for Completed date
Rename 'Seeders/Peers' to 'Seeds:Peers'
For translation added colon to WebUI status strings to match GTK
This commit is contained in:
Calum Lind 2014-02-17 13:44:14 +00:00
parent 43f12ffdd4
commit aa5e5178d3
14 changed files with 355 additions and 255 deletions

View File

@ -446,19 +446,24 @@ def ftime(seconds):
return '%dy %dw' % (years, weeks)
def fdate(seconds):
def fdate(seconds, date_only=False, precision_secs=False):
"""
Formats a date time string in the locale's date representation based on the systems timezone
:param seconds: time in seconds since the Epoch
:type seconds: float
:param precision_secs: include seconds in time format
:type precision_secs: bool
:returns: a string in the locale's datetime representation or "" if seconds < 0
:rtype: string
"""
if seconds < 0:
return ""
return time.strftime("%x %X", time.localtime(seconds))
if precision_secs:
return time.strftime("%x %X", time.localtime(seconds))
else:
return time.strftime("%x %H:%M", time.localtime(seconds))
def is_url(url):

View File

@ -146,100 +146,119 @@ class FILTER:
QUEUED=7
DEFAULT_PREFS = {
"show_queue":True,
"show_size":True,
"show_state":False,
"show_progress":True,
"show_seeders":False,
"show_peers":False,
"show_downspeed":True,
"show_upspeed":True,
"show_eta":True,
"show_ratio":False,
"show_avail":False,
"show_added":False,
"show_tracker":False,
"show_savepath":False,
"show_downloaded":False,
"show_uploaded":False,
"show_remaining":False,
"show_owner":False,
"show_downloading_time":False,
"show_seeding_time":False,
"queue_width":4,
"name_width":-1,
"size_width":8,
"state_width":13,
"progress_width":7,
"seeders_width":10,
"peers_width":10,
"downspeed_width":7,
"upspeed_width":7,
"eta_width":8,
"ratio_width":10,
"avail_width":10,
"added_width":25,
"tracker_width":15,
"savepath_width":15,
"downloaded_width":13,
"uploaded_width":13,
"remaining_width":13,
"owner_width":10,
"downloading_time_width":10,
"seeding_time_width":10,
"ignore_duplicate_lines": False,
"move_selection": True,
"third_tab_lists_all": False,
"torrents_per_tab_press": 15,
"sort_primary": "queue",
"sort_secondary": "name",
"separate_complete": True,
"ring_bell": False,
"save_legacy_history": True,
"first_run": True,
"addtorrents_show_misc_files": False, #TODO: Showing/hiding this
"addtorrents_show_hidden_folders": False, #TODO: Showing/hiding this
"addtorrents_sort_column": "date",
"addtorrents_reverse_sort": True,
"addtorrents_last_path": "~"
"show_queue": True,
"show_size": True,
"show_state": False,
"show_progress": True,
"show_seeds": False,
"show_peers": False,
"show_downspeed": True,
"show_upspeed": True,
"show_eta": True,
"show_ratio": False,
"show_avail": False,
"show_added": False,
"show_tracker": False,
"show_savepath": False,
"show_downloaded": False,
"show_uploaded": False,
"show_remaining": False,
"show_owner": False,
"show_downloading_time": False,
"show_seeding_time": False,
"show_completed": False,
"show_seeds_peers_ratio": False,
"show_complete_seen": False,
"show_down_limit": False,
"show_up_limit": False,
"show_shared": False,
"queue_width": 4,
"name_width": -1,
"size_width": 8,
"state_width": 13,
"progress_width": 7,
"seeds_width": 10,
"peers_width": 10,
"downspeed_width": 7,
"upspeed_width": 7,
"eta_width": 8,
"ratio_width": 10,
"avail_width": 10,
"added_width": 15,
"tracker_width": 15,
"savepath_width": 15,
"downloaded_width": 13,
"uploaded_width": 13,
"remaining_width": 13,
"owner_width": 10,
"downloading_time_width": 10,
"seeding_time_width": 10,
"completed_width": 15,
"seeds_peers_ratio_width": 10,
"complete_seen_width": 15,
"down_limit_width": 7,
"up_limit_width": 7,
"shared_width": 10,
"ignore_duplicate_lines": False,
"move_selection": True,
"third_tab_lists_all": False,
"torrents_per_tab_press": 15,
"sort_primary": "queue",
"sort_secondary": "name",
"separate_complete": True,
"ring_bell": False,
"save_legacy_history": True,
"first_run": True,
"addtorrents_show_misc_files": False, #TODO: Showing/hiding this
"addtorrents_show_hidden_folders": False, #TODO: Showing/hiding this
"addtorrents_sort_column": "date",
"addtorrents_reverse_sort": True,
"addtorrents_last_path": "~"
}
column_pref_names = ["queue","name","size","state",
"progress","seeders","peers",
"downspeed","upspeed","eta",
"ratio","avail","added","tracker",
"savepath","downloaded","uploaded", "remaining",
"owner","downloading_time","seeding_time"]
column_pref_names = ["queue", "name", "size", "state", "progress", "seeds",
"peers", "downspeed", "upspeed", "eta", "ratio", "avail",
"added", "tracker", "savepath","downloaded","uploaded",
"remaining", "owner","downloading_time","seeding_time",
"completed", "seeds_peers_ratio", "complete_seen",
"down_limit", "up_limit", "shared",
]
prefs_to_names = {
"queue":"#",
"name":"Name",
"size":"Size",
"state":"State",
"progress":"Progress",
"seeders":"Seeders",
"peers":"Peers",
"downspeed":"Down Speed",
"upspeed":"Up Speed",
"eta":"ETA",
"ratio":"Ratio",
"avail":"Avail",
"added":"Added",
"tracker":"Tracker",
"savepath":"Save Path",
"downloaded":"Downloaded",
"uploaded":"Uploaded",
"remaining":"Remaining",
"owner":"Owner",
"seeding_time":"Seeding Time",
"downloading_time":"Active Time"
"queue": "#",
"name": "Name",
"size": "Size",
"state": "State",
"progress": "Progress",
"seeds": "Seeds",
"peers": "Peers",
"downspeed": "Down Speed",
"upspeed": "Up Speed",
"eta": "ETA",
"ratio": "Ratio",
"avail": "Avail",
"added": "Added",
"tracker": "Tracker",
"savepath": "Save Path",
"downloaded": "Downloaded",
"uploaded": "Uploaded",
"remaining": "Remaining",
"owner": "Owner",
"seeding_time": "Seeding Time",
"downloading_time": "Active Time",
"complete_seen": "Complete Seen",
"completed": "Completed",
"seeds_peers_ratio": "Seeds:Peers",
"down_limit": "Down Limit",
"up_limit": "Up Limit",
"shared": "Shared"
}
column_names_to_state_keys = {
"size": "total_wanted",
"downspeed": "download_payload_rate",
"upspeed": "upload_payload_rate",
"seeders": "num_seeds",
"seeds": "num_seeds",
"peers": "num_peers",
"avail": "distributed_copies",
"added": "time_added",
@ -247,10 +266,15 @@ column_names_to_state_keys = {
"savepath": "save_path",
"uploaded": "total_uploaded",
"downloaded": "all_time_download",
"remaining":"total_remaining",
"seeding_time":"seeding_time",
"downloading_time":"active_time"
"remaining": "total_remaining",
"seeding_time": "seeding_time",
"downloading_time": "active_time",
"complete_seen": "last_seen_complete",
"completed": "completed_time",
"seeds_peers_ratio": "seeds_peers_ratio",
"down_limit": "max_download_speed",
"up_limit": "max_upload_speed",
"shared": "shared"
}
reverse_sort_fields = [
@ -313,30 +337,35 @@ class AllTorrents(BaseMode, component.Component):
component.start(["AllTorrents"])
self._info_fields = [
("Name",None,("name",)),
("Name",None, ("name",)),
("State", None, ("state",)),
("Down Speed", format_utils.format_speed, ("download_payload_rate",)),
("Up Speed", format_utils.format_speed, ("upload_payload_rate",)),
("Progress", format_utils.format_progress, ("progress",)),
("ETA", deluge.common.ftime, ("eta",)),
("Path", None, ("save_path",)),
("Downloaded",deluge.common.fsize,("all_time_download",)),
("Uploaded", deluge.common.fsize,("total_uploaded",)),
("Downloaded", deluge.common.fsize, ("all_time_download",)),
("Uploaded", deluge.common.fsize, ("total_uploaded",)),
("Share Ratio", format_utils.format_float, ("ratio",)),
("Seeders",format_utils.format_seeds_peers,("num_seeds","total_seeds")),
("Peers",format_utils.format_seeds_peers,("num_peers","total_peers")),
("Active Time",deluge.common.ftime,("active_time",)),
("Seeding Time",deluge.common.ftime,("seeding_time",)),
("Date Added",deluge.common.fdate,("time_added",)),
("Seeds", format_utils.format_seeds_peers, ("num_seeds", "total_seeds")),
("Peers", format_utils.format_seeds_peers,("num_peers", "total_peers")),
("Active Time", deluge.common.ftime, ("active_time",)),
("Seeding Time", deluge.common.ftime, ("seeding_time",)),
("Complete Seen", format_utils.format_date_never, ("last_seen_complete",)),
("Date Added", format_utils.format_time, ("time_added",)),
("Completed", format_utils.format_date, ("completed_time",)),
("Availability", format_utils.format_float, ("distributed_copies",)),
("Pieces", format_utils.format_pieces, ("num_pieces","piece_length")),
("Pieces", format_utils.format_pieces, ("num_pieces", "piece_length")),
("Seed Rank", str, ("seed_rank",)),
]
self.__status_keys = ["name","state","download_payload_rate","upload_payload_rate",
"progress","eta","all_time_download","total_uploaded", "ratio",
"num_seeds","total_seeds","num_peers","total_peers", "active_time",
"seeding_time","time_added","distributed_copies", "num_pieces",
"piece_length","save_path"]
self.__status_keys = ["name", "state", "download_payload_rate", "upload_payload_rate",
"progress", "eta", "save_path", "all_time_download", "total_uploaded",
"ratio", "num_seeds", "total_seeds", "num_peers", "total_peers",
"active_time", "seeding_time", "last_seen_complete", "time_added",
"completed_time", "distributed_copies", "num_pieces", "piece_length",
"seed_rank"
]
self.legacy_mode = Legacy(self.stdscr, self.encoding)

View File

@ -48,27 +48,33 @@ def format_queue(qnum):
return ""
columns = {
"#":(("queue",),format_queue),
"Name":(("name",),None),
"Size":(("total_wanted",),deluge.common.fsize),
"State":(("state",),None),
"Progress":(("progress",),format_utils.format_progress),
"Seeders":(("num_seeds","total_seeds"),format_utils.format_seeds_peers),
"Peers":(("num_peers","total_peers"),format_utils.format_seeds_peers),
"Down Speed":(("download_payload_rate",),format_utils.format_speed),
"Up Speed":(("upload_payload_rate",),format_utils.format_speed),
"ETA":(("eta",), format_utils.format_time),
"Ratio":(("ratio",), format_utils.format_float),
"Avail":(("distributed_copies",), format_utils.format_float),
"Added":(("time_added",), deluge.common.fdate),
"Tracker":(("tracker_host",), None),
"Save Path":(("save_path",), None),
"Downloaded":(("all_time_download",), deluge.common.fsize),
"Uploaded":(("total_uploaded",), deluge.common.fsize),
"Remaining":(("total_remaining",), deluge.common.fsize),
"Owner":(("owner",),None),
"Active Time":(("active_time",), deluge.common.ftime),
"Seeding Time":(("seeding_time",), deluge.common.ftime)
"#": (("queue",), format_queue),
"Name": (("name",), None),
"Size": (("total_wanted",), deluge.common.fsize),
"State": (("state",), None),
"Progress": (("progress",), format_utils.format_progress),
"Seeds": (("num_seeds","total_seeds"), format_utils.format_seeds_peers),
"Peers": (("num_peers","total_peers"), format_utils.format_seeds_peers),
"Down Speed": (("download_payload_rate",), format_utils.format_speed),
"Up Speed": (("upload_payload_rate",), format_utils.format_speed),
"ETA": (("eta",), format_utils.format_time),
"Ratio": (("ratio",), format_utils.format_float),
"Avail": (("distributed_copies",), format_utils.format_float),
"Added": (("time_added",), deluge.common.fdate),
"Tracker": (("tracker_host",), None),
"Save Path": (("save_path",), None),
"Downloaded": (("all_time_download",), deluge.common.fsize),
"Uploaded": (("total_uploaded",), deluge.common.fsize),
"Remaining": (("total_remaining",), deluge.common.fsize),
"Owner": (("owner",), None),
"Shared": (("shared",), str),
"Active Time": (("active_time",), deluge.common.ftime),
"Seeding Time": (("seeding_time",), deluge.common.ftime),
"Complete Seen": (("last_seen_complete",), format_utils.format_date_never),
"Completed": (("completed_time",), format_utils.format_date),
"Seeds:Peers": (("seeds_peers_ratio",), format_utils.format_float),
"Down Limit": (("max_download_speed",), format_utils.format_speed),
"Up Limit": (("max_upload_speed",), format_utils.format_speed),
}
def get_column_value(name,state):

View File

@ -53,6 +53,18 @@ def format_time(time):
else:
return "-"
def format_date(time):
if (time > 0):
return deluge.common.fdate(time)
else:
return ""
def format_date_never(time):
if (time > 0):
return deluge.common.fdate(time)
else:
return "Never"
def format_float(x):
if x < 0:
return "-"

View File

@ -103,11 +103,11 @@ class TorrentDetail(BaseMode, component.Component):
self.torrent_state = None
self.popup = None
self.messages = deque()
self._status_keys = ["files", "name","state","download_payload_rate","upload_payload_rate",
"progress","eta","all_time_download","total_uploaded", "ratio",
"num_seeds","total_seeds","num_peers","total_peers", "active_time",
"seeding_time","time_added","distributed_copies", "num_pieces",
"piece_length","save_path","file_progress","file_priorities","message",
self._status_keys = ["files", "name", "state", "download_payload_rate", "upload_payload_rate",
"progress", "eta", "all_time_download", "total_uploaded", "ratio",
"num_seeds", "total_seeds", "num_peers", "total_peers", "active_time",
"seeding_time", "time_added", "distributed_copies", "num_pieces",
"piece_length", "save_path", "file_progress", "file_priorities", "message",
"total_wanted", "tracker_host", "owner"]
self.file_list = None
@ -164,7 +164,7 @@ class TorrentDetail(BaseMode, component.Component):
self.files_sep = "{!green,black,bold,underline!}%s"%(("Files (File list unknown)").center(self.cols))
need_prio_update = True
self.__fill_progress(self.file_list,state["file_progress"])
for i,prio in enumerate(state["file_priorities"]):
for i, prio in enumerate(state["file_priorities"]):
if self.file_dict[i][6] != prio:
need_prio_update = True
self.file_dict[i][6] = prio
@ -475,10 +475,10 @@ class TorrentDetail(BaseMode, component.Component):
s+= " {!info!}Ratio: {!input!}%s" % ratio_str
self.add_string(off, s); off += 1
#Seeder/leecher info
s = "{!info!}Seeders:{!green!} %s {!input!}(%s)" % (status["num_seeds"], status["total_seeds"])
#Seed/peer info
s = "{!info!}Seeds:{!green!} %s {!input!}(%s)" % (status["num_seeds"], status["total_seeds"])
self.add_string(off, s); off += 1
s = "{!info!}Leechers:{!red!} %s {!input!}(%s)" % (status["num_peers"], status["total_peers"])
s = "{!info!}Peers:{!red!} %s {!input!}(%s)" % (status["num_peers"], status["total_peers"])
self.add_string(off, s); off += 1
#Tracker

View File

@ -448,8 +448,8 @@ class FilesTab(Tab):
return
# Store this torrent's compact setting
if status["storage_mode"] == "compact":
self.__compact = True
if "storage_mode" in status:
self.__compact = status["storage_mode"] == "compact"
if "is_seed" in status:
self.__is_seed = status["is_seed"]

View File

@ -134,20 +134,6 @@
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="summary_seed_rank">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">7</property>
<property name="right_attach">8</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="summary_seed_time">
<property name="visible">True</property>
@ -162,24 +148,6 @@
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label20">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Seed Rank:</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left_attach">6</property>
<property name="right_attach">7</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label19">
<property name="visible">True</property>
@ -290,43 +258,6 @@
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="summary_last_seen_complete">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="wrap">True</property>
<property name="wrap_mode">char</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left_attach">5</property>
<property name="right_attach">8</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_last_seen_complete">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="label" translatable="yes">Last Seen Complete:</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left_attach">4</property>
<property name="right_attach">5</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="summary_availability">
<property name="visible">True</property>
@ -423,7 +354,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="summary_seeders">
<object class="GtkLabel" id="summary_seeds">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@ -439,7 +370,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Seeders:</property>
<property name="label" translatable="yes">Seeds:</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@ -726,6 +657,106 @@
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label20">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Seed Rank:</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left_attach">4</property>
<property name="right_attach">5</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="summary_seed_rank">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">5</property>
<property name="right_attach">6</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_last_seen_complete">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="label" translatable="yes">Complete Seen:</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left_attach">6</property>
<property name="right_attach">7</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="summary_last_seen_complete">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="wrap">True</property>
<property name="wrap_mode">char</property>
</object>
<packing>
<property name="left_attach">7</property>
<property name="right_attach">8</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_completed">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Completed:</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left_attach">6</property>
<property name="right_attach">7</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="summary_completed">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">7</property>
<property name="right_attach">8</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
@ -1926,9 +1957,6 @@
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
@ -1977,6 +2005,9 @@
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="left_attach">2</property>

View File

@ -64,6 +64,13 @@ def fspeed(value, max_value=-1):
else:
return deluge.common.fspeed(value)
def fdate(value):
"""Display value as date, eg 05/05/08 or blank"""
if value > 0.0:
return deluge.common.fdate(value)
else:
return ""
def fdate_or_never(value):
"""Display value as date, eg 05/05/08 or Never"""
if value > 0.0:
@ -95,7 +102,7 @@ class StatusTab(Tab):
(builder.get_object("summary_total_uploaded"), fpeer_sized, ("total_uploaded", "total_payload_upload")),
(builder.get_object("summary_download_speed"), fspeed, ("download_payload_rate", "max_download_speed")),
(builder.get_object("summary_upload_speed"), fspeed, ("upload_payload_rate", "max_upload_speed")),
(builder.get_object("summary_seeders"), deluge.common.fpeer, ("num_seeds", "total_seeds")),
(builder.get_object("summary_seeds"), deluge.common.fpeer, ("num_seeds", "total_seeds")),
(builder.get_object("summary_peers"), deluge.common.fpeer, ("num_peers", "total_peers")),
(builder.get_object("summary_eta"), deluge.common.ftime, ("eta",)),
(builder.get_object("summary_share_ratio"), fratio, ("ratio",)),
@ -108,6 +115,7 @@ class StatusTab(Tab):
(builder.get_object("progressbar"), fpcnt, ("progress",)),
(builder.get_object("summary_date_added"), deluge.common.fdate, ("time_added",)),
(builder.get_object("summary_last_seen_complete"), fdate_or_never, ("last_seen_complete",)),
(builder.get_object("summary_completed"), fdate, ("completed_time",)),
]
def update(self):
@ -129,7 +137,8 @@ class StatusTab(Tab):
"total_seeds", "eta", "ratio", "next_announce",
"tracker_status", "max_connections", "max_upload_slots",
"max_upload_speed", "max_download_speed", "active_time",
"seeding_time", "seed_rank", "is_auto_managed", "time_added", "last_seen_complete"]
"seeding_time", "seed_rank", "is_auto_managed", "time_added",
"last_seen_complete", "completed_time"]
if self.config['show_piecesbar']:
status_keys.extend(["pieces", "state"])

View File

@ -271,13 +271,13 @@ class TorrentView(listview.ListView, component.Component):
status_field=["progress", "state"],
col_types=[float, str],
function=funcs.cell_data_progress)
self.add_func_column(_("Seeders"), funcs.cell_data_peer, [int, int],
self.add_func_column(_("Seeds"), funcs.cell_data_peer, [int, int],
status_field=["num_seeds", "total_seeds"],
sort_func=seed_peer_column_sort, default=False)
self.add_func_column(_("Peers"), funcs.cell_data_peer, [int, int],
status_field=["num_peers", "total_peers"],
sort_func=seed_peer_column_sort, default=False)
self.add_func_column(_("Seeders") + "/" + _("Peers"), funcs.cell_data_ratio_seeders, [float],
self.add_func_column(_("Seeds:Peers"), funcs.cell_data_ratio_seeds_peers, [float],
status_field=["seeds_peers_ratio"], default=False)
self.add_func_column(_("Down Speed"), funcs.cell_data_speed_down, [float],
status_field=["download_payload_rate"])
@ -295,15 +295,12 @@ class TorrentView(listview.ListView, component.Component):
status_field=["distributed_copies"], default=False)
self.add_func_column(_("Added"), funcs.cell_data_date, [float],
status_field=["time_added"], default=False)
self.add_func_column(_("Completed"),
funcs.cell_data_date_or_never, [float],
self.add_func_column(_("Completed"), funcs.cell_data_date, [float],
status_field=["completed_time"], default=False)
self.add_func_column(_("Last Seen Complete"),
funcs.cell_data_date_or_never, [float],
self.add_func_column(_("Complete Seen"), funcs.cell_data_date_or_never, [float],
status_field=["last_seen_complete"], default=False)
self.add_texticon_column(_("Tracker"),
status_field=["tracker_host", "tracker_host"],
function=funcs.cell_data_trackericon, default=False)
self.add_texticon_column(_("Tracker"), function=funcs.cell_data_trackericon,
status_field=["tracker_host", "tracker_host"], default=False)
self.add_text_column(_("Save Path"), status_field=["save_path"], default=False)
self.add_text_column(_("Owner"), status_field=["owner"], default=False)
self.restore_columns_order_from_state()

View File

@ -84,7 +84,7 @@ def _t(text):
func_last_value = {"cell_data_speed_down": None,
"cell_data_speed_up": None,
"cell_data_time": None,
"cell_data_ratio_seeders": None,
"cell_data_ratio_seeds_peers": None,
"cell_data_ratio_ratio": None,
"cell_data_ratio_avail": None,
"cell_data_date": None,
@ -269,8 +269,8 @@ def cell_data_ratio(cell, model, row, data, cache_key):
func_last_value[cache_key] = ratio
cell.set_property('text', "" if ratio < 0 else "%.3f" % ratio)
def cell_data_ratio_seeders(column, cell, model, row, data):
cell_data_ratio(cell, model, row, data, "cell_data_ratio_seeders")
def cell_data_ratio_seeds_peers(column, cell, model, row, data):
cell_data_ratio(cell, model, row, data, "cell_data_ratio_seeds_peers")
def cell_data_ratio_ratio(column, cell, model, row, data):
cell_data_ratio(cell, model, row, data, "cell_data_ratio_ratio")
@ -286,7 +286,7 @@ def cell_data_date(column, cell, model, row, data):
return
func_last_value["cell_data_date"] = date
date_str = common.fdate(date)
date_str = common.fdate(date) if date > 0.0 else ""
cell.set_property('text', date_str)
def cell_data_date_or_never(column, cell, model, row, data):

View File

@ -42,9 +42,9 @@ Deluge.Keys = {
* <pre>['queue', 'name', 'total_size', 'total_wanted', 'state', 'progress', 'num_seeds',
* 'total_seeds', 'num_peers', 'total_peers', 'download_payload_rate',
* 'upload_payload_rate', 'eta', 'ratio', 'distributed_copies',
* 'is_auto_managed', 'time_added', 'tracker_host', 'save_path',
* 'is_auto_managed', 'time_added', 'tracker_host', 'save_path', 'last_seen_complete',
* 'total_done', 'total_uploaded', 'max_download_speed', 'max_upload_speed',
* 'seeds_peers_ratio', 'total_remaining']</pre>
* 'seeds_peers_ratio', 'total_remaining', 'completed_time']</pre>
*/
Grid: [
'queue', 'name', 'total_size', 'total_wanted', 'state', 'progress', 'num_seeds',
@ -52,7 +52,7 @@ Deluge.Keys = {
'upload_payload_rate', 'eta', 'ratio', 'distributed_copies',
'is_auto_managed', 'time_added', 'tracker_host', 'save_path', 'last_seen_complete',
'total_done', 'total_uploaded', 'max_download_speed', 'max_upload_speed',
'seeds_peers_ratio', 'total_remaining'
'seeds_peers_ratio', 'total_remaining', 'completed_time'
],
/**
@ -61,13 +61,13 @@ Deluge.Keys = {
* <pre>['total_done', 'total_payload_download', 'total_uploaded',
* 'total_payload_upload', 'next_announce', 'tracker_status', 'num_pieces',
* 'piece_length', 'is_auto_managed', 'active_time', 'seeding_time',
* 'seed_rank']</pre>
* 'seed_rank', 'last_seen_complete', 'completed_time', 'owner', 'public', 'shared']</pre>
*/
Status: [
'total_done', 'total_payload_download', 'total_uploaded',
'total_payload_upload', 'next_announce', 'tracker_status', 'num_pieces',
'piece_length', 'is_auto_managed', 'active_time', 'seeding_time',
'seed_rank', 'last_seen_complete', 'owner', 'public', 'shared'
'seed_rank', 'last_seen_complete', 'completed_time', 'owner', 'public', 'shared'
],
/**

View File

@ -131,7 +131,7 @@
renderer: torrentProgressRenderer,
dataIndex: 'progress'
}, {
header: _('Seeders'),
header: _('Seeds'),
hidden: true,
width: 60,
sortable: true,
@ -184,11 +184,19 @@
renderer: fdate,
dataIndex: 'time_added'
}, {
header: _('Last Seen Complete'),
header: _('Complete Seen'),
hidden: true,
width: 80,
sortable: true,
renderer: dateOrNever,
dataIndex: 'last_seen_complete'
}, {
header: _('Completed'),
hidden: true,
width: 80,
sortable: true,
renderer: dateOrNever,
dataIndex: 'completed_time'
}, {
header: _('Tracker'),
hidden: true,
@ -259,7 +267,7 @@
renderer: torrentLimitRenderer,
dataIndex: 'max_upload_speed'
}, {
header: _('Seeders') + '/' + _('Peers'),
header: _('Seeds:Peers'),
hidden: true,
width: 75,
sortable: true,

View File

@ -91,9 +91,10 @@ Deluge.details.StatusTab = Ext.extend(Ext.Panel, {
},
onRequestComplete: function(status) {
seeders = status.total_seeds > -1 ? status.num_seeds + ' (' + status.total_seeds + ')' : status.num_seeds;
seeds = status.total_seeds > -1 ? status.num_seeds + ' (' + status.total_seeds + ')' : status.num_seeds;
peers = status.total_peers > -1 ? status.num_peers + ' (' + status.total_peers + ')' : status.num_peers;
last_seen_complete = status.last_seen_complete > 0.0 ? fdate(status.last_seen_complete) : "Never";
completed_time = status.last_seen_complete > 0.0 ? fdate(status.completed_time) : "Never";
var data = {
downloaded: fsize(status.total_done, true),
uploaded: fsize(status.total_uploaded, true),
@ -104,14 +105,15 @@ Deluge.details.StatusTab = Ext.extend(Ext.Panel, {
upspeed: (status.upload_payload_rate) ? fspeed(status.upload_payload_rate) : '0.0 KiB/s',
eta: ftime(status.eta),
pieces: status.num_pieces + ' (' + fsize(status.piece_length) + ')',
seeders: seeders,
seeds: seeds,
peers: peers,
avail: status.distributed_copies.toFixed(3),
active_time: ftime(status.active_time),
seeding_time: ftime(status.seeding_time),
seed_rank: status.seed_rank,
time_added: fdate(status.time_added),
last_seen_complete: last_seen_complete
last_seen_complete: last_seen_complete,
completed_time: completed_time
}
data.auto_managed = _((status.is_auto_managed) ? 'True' : 'False');

View File

@ -1,27 +1,28 @@
<dl>
<dt class="downloaded">${_("Downloaded")}:</dt><dd class="downloaded"/>
<dt class="uploaded">${_("Uploaded")}:</dt><dd class="uploaded"/>
<dt class="share">${_("Share Ratio")}:</dt><dd class="share"/>
<dt class="announce">${_("Next Announce")}:</dt><dd class="announce"/>
<dt class="tracker">${_("Tracker Status")}:</dt><dd class="tracker_status"/>
<dt class="downloaded">${_("Downloaded:")}</dt><dd class="downloaded"/>
<dt class="uploaded">${_("Uploaded:")}</dt><dd class="uploaded"/>
<dt class="share">${_("Share Ratio:")}</dt><dd class="share"/>
<dt class="announce">${_("Next Announce:")}</dt><dd class="announce"/>
<dt class="tracker">${_("Tracker Status:")}</dt><dd class="tracker_status"/>
</dl>
<dl>
<dt class="downspeed">${_("Speed")}:</dt><dd class="downspeed"/>
<dt class="upspeed">${_("Speed")}:</dt><dd class="upspeed"/>
<dt class="eta">${_("ETA")}:</dt><dd class="eta"/>
<dt class="pieces">${_("Pieces")}:</dt><dd class="pieces"/>
<dt class="downspeed">${_("Down Speed:")}</dt><dd class="downspeed"/>
<dt class="upspeed">${_("Up Speed:")}</dt><dd class="upspeed"/>
<dt class="eta">${_("ETA:")}</dt><dd class="eta"/>
<dt class="pieces">${_("Pieces:")}</dt><dd class="pieces"/>
</dl>
<dl>
<dt class="seeders">${_("Seeders")}:</dt><dd class="seeders"/>
<dt class="peers">${_("Peers")}:</dt><dd class="peers"/>
<dt class="avail">${_("Availability")}:</dt><dd class="avail"/>
<dt class="auto_managed">${_("Auto Managed")}:</dt><dd class="auto_managed"/>
<dt class="last_seen_complete">${_("Last Seen Complete")}:&nbsp;</dt><dd class="last_seen_complete"/>
<dt class="seeds">${_("Seeds:")}</dt><dd class="seeds"/>
<dt class="peers">${_("Peers:")}</dt><dd class="peers"/>
<dt class="avail">${_("Availability:")}</dt><dd class="avail"/>
<dt class="auto_managed">${_("Auto Managed:")}</dt><dd class="auto_managed"/>
<dt class="last_seen_complete">${_("Complete Seen:")}</dt><dd class="last_seen_complete"/>
</dl>
<dl>
<dt class="active_time">${_("Active Time")}:</dt><dd class="active_time"/>
<dt class="seeding_time">${_("Seeding Time")}:</dt><dd class="seeding_time"/>
<dt class="seed_rank">${_("Seed Rank")}:</dt><dd class="seed_rank"/>
<dt class="time_rank">${_("Date Added")}:</dt><dd class="time_added"/>
<dt class="active_time">${_("Active Time:")}</dt><dd class="active_time"/>
<dt class="seeding_time">${_("Seeding Time:")}</dt><dd class="seeding_time"/>
<dt class="seed_rank">${_("Seed Rank:")}</dt><dd class="seed_rank"/>
<dt class="time_rank">${_("Date Added:")}</dt><dd class="time_added"/>
<dt class="completed_time">${_("Completed:")}</dt><dd class="completed_time"/>
</dl>
<br style="clear: both;" />