summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfuhry <fuhry>2011-05-22 19:16:07 +0100
committerCalum Lind <calumlind+deluge@gmail.com>2011-05-22 19:20:40 +0100
commit79c9dd30760281b3ceb05fe615df3a6df23bfa42 (patch)
tree3670c5fcbb7b5fa94812b9cf09a2394e5420b885
parentedb0c2e71dbca84813fa468cab191f91db129492 (diff)
downloaddeluge-79c9dd30760281b3ceb05fe615df3a6df23bfa42.zip
deluge-79c9dd30760281b3ceb05fe615df3a6df23bfa42.tar.gz
deluge-79c9dd30760281b3ceb05fe615df3a6df23bfa42.tar.bz2
Add libtorrent version to user_agent string
Example: Deluge/1.3.900-dev Libtorrent/0.15.5
-rw-r--r--deluge/core/core.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/deluge/core/core.py b/deluge/core/core.py
index 6537ce3..6b8cd3d 100644
--- a/deluge/core/core.py
+++ b/deluge/core/core.py
@@ -88,7 +88,9 @@ class Core(component.Component):
# Set the user agent
self.settings = lt.session_settings()
- self.settings.user_agent = "Deluge %s" % deluge.common.get_version()
+ self.settings.user_agent = "Deluge/%(deluge_version)s Libtorrent/%(lt_version)s" % \
+ { 'deluge_version': deluge.common.get_version(),
+ 'lt_version': self.get_libtorrent_version().rpartition(".")[0] }
# Set session settings
self.settings.send_redundant_have = True