From aad2c464e44cc733125859d5345d3ae977e3b9d1 Mon Sep 17 00:00:00 2001 From: Alex Dedul Date: Thu, 9 Aug 2007 03:50:32 +0000 Subject: [PATCH] Set per torrent prefences on torrent add. --- src/core.py | 11 +++++++---- src/interface.py | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/core.py b/src/core.py index af6e6a12d..b8ba2e4f9 100644 --- a/src/core.py +++ b/src/core.py @@ -911,10 +911,13 @@ class Manager: # preferences were changed. for unique_ID in self.unique_IDs: self.prioritize_files(unique_ID, self.get_priorities(unique_ID)) - self.set_max_connections_per_torrent(unique_ID, - self.get_pref("max_connections_per_torrent")) - self.set_max_upload_slots_per_torrent(unique_ID, - self.get_pref("max_upload_slots_per_torrent")) + self.apply_prefs_per_torrent(unique_ID) + + def apply_prefs_per_torrent(self, unique_ID): + self.set_max_connections_per_torrent(unique_ID, + self.get_pref("max_connections_per_torrent")) + self.set_max_upload_slots_per_torrent(unique_ID, + self.get_pref("max_upload_slots_per_torrent")) def set_DHT(self, start=False): if start == True and self.dht_running != True: diff --git a/src/interface.py b/src/interface.py index 462b1a9bd..f07b6fe1c 100644 --- a/src/interface.py +++ b/src/interface.py @@ -1092,6 +1092,7 @@ class DelugeGTK: files_dialog.get_priorities()) if files_dialog.is_private_flag_checked(): self.manager.set_priv(unique_id, True) + self.manager.apply_prefs_per_torrent(unique_id) else: return else: