Module: deluge
Branch: pieces-progress-bar
Commit: 79c9dd30760281b3ceb05fe615df3a6df23bfa42

Author: fuhry <fuhry>
Date:   Sun May 22 19:16:07 2011 +0100

Add libtorrent version to user_agent string

Example: Deluge/1.3.900-dev Libtorrent/0.15.5

---

 deluge/core/core.py |    4 +++-
 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

-- 
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.

Reply via email to