From f7575931465a078f76714361043da3c49b3029c9 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Tue, 29 Jan 2008 06:58:23 +0000 Subject: [PATCH] add dht nodes to status bar --- deluge/core/core.py | 7 +++++++ deluge/data/pixmaps/dht16.png | Bin 0 -> 607 bytes deluge/data/revision | 1 + deluge/ui/client.py | 3 +++ deluge/ui/gtkui/statusbar.py | 15 +++++++++++++++ 5 files changed, 26 insertions(+) create mode 100644 deluge/data/pixmaps/dht16.png diff --git a/deluge/core/core.py b/deluge/core/core.py index 1d124e2ff..b830b0a39 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -443,6 +443,10 @@ class Core( """Returns the current number of connections""" return self.session.num_connections() + def export_get_dht_nodes(self): + """Returns the number of dht nodes""" + return self.session.status().dht_nodes + def export_get_download_rate(self): """Returns the payload download rate""" return self.session.status().payload_download_rate @@ -568,6 +572,9 @@ class Core( log.debug("dht value set to %s", value) if value: self.session.start_dht(None) + self.session.add_dht_router("router.bittorrent.com", 6881) + self.session.add_dht_router("router.utorrent.com", 6881) + self.session.add_dht_router("router.bitcomet.com", 6881) else: self.session.stop_dht() diff --git a/deluge/data/pixmaps/dht16.png b/deluge/data/pixmaps/dht16.png new file mode 100644 index 0000000000000000000000000000000000000000..be59e5e61d3887445f2bc094dc230348a6539582 GIT binary patch literal 607 zcmV-l0-*hgP)qz*w7TpSVv)2#$V^iCnD&_Pt_)}A;NBPd7<;!vVkTJt(wPOkC% zrtf?I|M@<6d5t8(D)^aRAP*b?YQW8Gs{DlilnLR2pV<%013Mz`0?uSp<(F}=73r_E zfB*)#78N|t>kRuuMBf>=T@AH2p$_0R(BpaD3t%vM`B@zN{p*ic#+YNZTJ1W})078* zlYil{L({V#=azE7TBv>dyfV|VZ+lMC+hj6XjqLmh%p-|(QRcwF*dWlBUl`q;Ul{H0 zy^uT$v;(IkAqm%Y`&`$Za$Pqi36n1B1TYPB0X|??96lIh`XtR7V>*F7lIH9Z7SL94 zs6*iPWD^8P0oe_PNne2a#k