diff --git a/deluge/core/core.py b/deluge/core/core.py
index b97e3aded..ef7366747 100644
--- a/deluge/core/core.py
+++ b/deluge/core/core.py
@@ -80,10 +80,7 @@ class Core(component.Component):
while len(version) < 4:
version.append(0)
- # Note: All libtorrent python bindings to set plugins/extensions need to be disabled
- # due to GIL issue. https://code.google.com/p/libtorrent/issues/detail?id=369
- # Setting session flags to 1 enables all libtorrent default plugins
- self.session = lt.session(lt.fingerprint("DE", *version), flags=1)
+ self.session = lt.session(lt.fingerprint("DE", *version), flags=0)
# Load the session state if available
self.__load_session_state()
@@ -105,12 +102,9 @@ class Core(component.Component):
lt.io_buffer_mode_t.disable_os_cache
self.session.set_settings(self.settings)
- # Load metadata extension
- # Note: All libtorrent python bindings to set plugins/extensions need to be disabled
- # due to GIL issue. https://code.google.com/p/libtorrent/issues/detail?id=369
- # self.session.add_extension(lt.create_metadata_plugin)
- # self.session.add_extension(lt.create_ut_metadata_plugin)
- # self.session.add_extension(lt.create_smart_ban_plugin)
+ self.session.add_extension("metadata_transfer")
+ self.session.add_extension("ut_metadata")
+ self.session.add_extension("smart_ban")
# Create the components
self.eventmanager = EventManager()
diff --git a/deluge/core/preferencesmanager.py b/deluge/core/preferencesmanager.py
index 903565590..bbfb48b33 100644
--- a/deluge/core/preferencesmanager.py
+++ b/deluge/core/preferencesmanager.py
@@ -68,6 +68,7 @@ DEFAULT_PREFS = {
"upnp": True,
"natpmp": True,
"utpex": True,
+ "lt_tex": True,
"lsd": True,
"enc_in_policy": 1,
"enc_out_policy": 1,
@@ -288,10 +289,12 @@ class PreferencesManager(component.Component):
def _on_set_utpex(self, key, value):
log.debug("utpex value set to %s", value)
if value:
- # Note: All libtorrent python bindings to set plugins/extensions need to be disabled
- # due to GIL issue. https://code.google.com/p/libtorrent/issues/detail?id=369
- #self.session.add_extension(lt.create_ut_pex_plugin)
- pass
+ self.session.add_extension("ut_pex")
+
+ def _on_set_lt_tex(self, key, value):
+ log.debug("lt_tex value set to %s", value)
+ if value:
+ self.session.add_extension("lt_trackers")
def _on_set_enc_in_policy(self, key, value):
self._on_set_encryption(key, value)
diff --git a/deluge/event.py b/deluge/event.py
index 4a1d644e4..db69ab8c4 100644
--- a/deluge/event.py
+++ b/deluge/event.py
@@ -184,9 +184,6 @@ class TorrentResumedEvent(DelugeEvent):
class TorrentFileCompletedEvent(DelugeEvent):
"""
Emitted when a file completes.
-
- This will only work with libtorrent 0.15 or greater.
-
"""
def __init__(self, torrent_id, index):
"""
diff --git a/deluge/ui/console/modes/preference_panes.py b/deluge/ui/console/modes/preference_panes.py
index 9f2543e82..da042bc5d 100644
--- a/deluge/ui/console/modes/preference_panes.py
+++ b/deluge/ui/console/modes/preference_panes.py
@@ -279,6 +279,7 @@ class NetworkPane(BasePane):
self.add_checked_input("upnp","UPnP",parent.core_config["upnp"])
self.add_checked_input("natpmp","NAT-PMP",parent.core_config["natpmp"])
self.add_checked_input("utpex","Peer Exchange",parent.core_config["utpex"])
+ self.add_checked_input("lt_tex","Tracker Exchange",parent.core_config["lt_tex"])
self.add_checked_input("lsd","LSD",parent.core_config["lsd"])
self.add_checked_input("dht","DHT",parent.core_config["dht"])
diff --git a/deluge/ui/gtkui/glade/preferences_dialog.ui b/deluge/ui/gtkui/glade/preferences_dialog.ui
index 312fa335e..9e9102059 100644
--- a/deluge/ui/gtkui/glade/preferences_dialog.ui
+++ b/deluge/ui/gtkui/glade/preferences_dialog.ui
@@ -1505,7 +1505,7 @@ used sparingly.
True
True
False
- Peer Exchange
+ Exchanges peers between clients. (Changing setting requires restart)
True
True
True
@@ -1516,6 +1516,26 @@ used sparingly.
GTK_FILL
+
+
+
+ 2
+ 3
+ 1
+ 2
+ GTK_FILL
+
+