From 14324874e184e81c6e713d954f635b2438cef3cb Mon Sep 17 00:00:00 2001 From: DjLegolas Date: Sun, 27 Feb 2022 01:14:31 +0200 Subject: [PATCH] [UI] Add and improve trackers tab First, added trackers tab to the WebUI. Second, now we can view all the trackers and view each: * status * number of peers * additional message Third, information about DHT, PeX and LSD is also added. Fourth, moved the private torrent info to the details tab. closes: https://dev.deluge-torrent.org/ticket/1015 --- deluge/ui/gtk3/details_tab.py | 3 +- deluge/ui/gtk3/glade/main_window.tabs.ui | 36 ++++++++++++++++++------ deluge/ui/gtk3/trackers_tab.py | 3 +- 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/deluge/ui/gtk3/details_tab.py b/deluge/ui/gtk3/details_tab.py index 04a5eabfe0..a029dc9948 100644 --- a/deluge/ui/gtk3/details_tab.py +++ b/deluge/ui/gtk3/details_tab.py @@ -12,7 +12,7 @@ import deluge.component as component from deluge.common import decode_bytes, fdate, fsize, is_url -from .tab_data_funcs import fdate_or_dash, fpieces_num_size +from .tab_data_funcs import fdate_or_dash, fpieces_num_size, fyes_no from .torrentdetails import Tab log = logging.getLogger(__name__) @@ -34,6 +34,7 @@ def __init__(self): self.add_tab_widget( 'summary_pieces', fpieces_num_size, ('num_pieces', 'piece_length') ) + self.add_tab_widget('summary_private', fyes_no, ('private',)) def update(self): # Get the first selected torrent diff --git a/deluge/ui/gtk3/glade/main_window.tabs.ui b/deluge/ui/gtk3/glade/main_window.tabs.ui index bce5b0a1d2..43621831cf 100644 --- a/deluge/ui/gtk3/glade/main_window.tabs.ui +++ b/deluge/ui/gtk3/glade/main_window.tabs.ui @@ -583,6 +583,17 @@ 2 + + + True + False + start + + + 4 + 1 + + True @@ -801,6 +812,21 @@ 3 + + + True + False + start + Private Torrent: + + + + + + 3 + 1 + + True @@ -809,8 +835,8 @@ 2 - 2 - 3 + 1 + 4 @@ -843,12 +869,6 @@ - - - - - - diff --git a/deluge/ui/gtk3/trackers_tab.py b/deluge/ui/gtk3/trackers_tab.py index 70506d112a..ce6d40e4a3 100644 --- a/deluge/ui/gtk3/trackers_tab.py +++ b/deluge/ui/gtk3/trackers_tab.py @@ -12,6 +12,7 @@ import deluge.component as component +from .tab_data_funcs import ftranslate from .torrentdetails import Tab log = logging.getLogger(__name__) @@ -145,7 +146,7 @@ def _on_get_torrent_tracker_status(self, status): for tracker in status['trackers']: new_trackers.add(tracker['url']) tracker_url = tracker['url'] - tracker_status = status['trackers_status'].get(tracker_url, '') + tracker_status = ftranslate(status['trackers_status'].get(tracker_url, '')) tracker_peers = status['trackers_peers'].get(tracker_url, 0) tracker_message = tracker.get('message', '') if tracker['url'] in self.trackers: