diff --git a/deluge/core/preferencesmanager.py b/deluge/core/preferencesmanager.py index 7e5c207a1f..9207f26e49 100644 --- a/deluge/core/preferencesmanager.py +++ b/deluge/core/preferencesmanager.py @@ -85,6 +85,7 @@ 'max_active_downloading': 3, 'max_active_limit': 8, 'dont_count_slow_torrents': False, + 'announce_to_all_trackers': True, 'queue_new_to_top': False, 'stop_seed_at_ratio': False, 'remove_seed_at_ratio': False, @@ -367,6 +368,9 @@ def _on_set_max_active_limit(self, key, value): def _on_set_dont_count_slow_torrents(self, key, value): self.core.apply_session_setting('dont_count_slow_torrents', value) + def _on_set_announce_to_all_trackers(self, key, value): + self.core.apply_session_setting('announce_to_all_trackers', value) + def _on_set_send_info(self, key, value): """sends anonymous stats home""" log.debug('Sending anonymous stats..') diff --git a/deluge/ui/console/modes/preferences/preference_panes.py b/deluge/ui/console/modes/preferences/preference_panes.py index b47bc4b079..6d8d997971 100644 --- a/deluge/ui/console/modes/preferences/preference_panes.py +++ b/deluge/ui/console/modes/preferences/preference_panes.py @@ -580,6 +580,11 @@ def create_pane(self, core_conf, console_config): 'Ignore slow torrents', core_conf['dont_count_slow_torrents'], ) + self.add_checked_input( + 'announce_to_all_trackers', + 'Announce to all trackers of the same tier', + core_conf['announce_to_all_trackers'], + ) self.add_checked_input( 'auto_manage_prefer_seeds', 'Prefer seeding torrents', diff --git a/deluge/ui/gtk3/glade/preferences_dialog.ui b/deluge/ui/gtk3/glade/preferences_dialog.ui index aa1531d759..64ce73fb84 100644 --- a/deluge/ui/gtk3/glade/preferences_dialog.ui +++ b/deluge/ui/gtk3/glade/preferences_dialog.ui @@ -2204,6 +2204,18 @@ used sparingly. 1 + + + Announce to all trackers of the same tier + True + True + False + True + + + 2 + + Prefer seeding torrents diff --git a/deluge/ui/gtk3/preferences.py b/deluge/ui/gtk3/preferences.py index 301d8753fd..6305b65f86 100644 --- a/deluge/ui/gtk3/preferences.py +++ b/deluge/ui/gtk3/preferences.py @@ -417,6 +417,7 @@ def _show(self): 'spin_seeding': ('value', 'max_active_seeding'), 'spin_downloading': ('value', 'max_active_downloading'), 'chk_dont_count_slow_torrents': ('active', 'dont_count_slow_torrents'), + 'chk_announce_to_all_trackers': ('active', 'announce_to_all_trackers'), 'chk_auto_manage_prefer_seeds': ('active', 'auto_manage_prefer_seeds'), 'chk_queue_new_top': ('active', 'queue_new_to_top'), 'spin_share_ratio_limit': ('value', 'share_ratio_limit'), @@ -832,6 +833,9 @@ def set_config(self, hide=False): new_core_config['dont_count_slow_torrents'] = self.builder.get_object( 'chk_dont_count_slow_torrents' ).get_active() + new_core_config['announce_to_all_trackers'] = self.builder.get_object( + 'chk_announce_to_all_trackers' + ).get_active() new_core_config['auto_manage_prefer_seeds'] = self.builder.get_object( 'chk_auto_manage_prefer_seeds' ).get_active() diff --git a/deluge/ui/web/js/deluge-all/preferences/QueuePage.js b/deluge/ui/web/js/deluge-all/preferences/QueuePage.js index c7b47c57c2..78d2bc5698 100644 --- a/deluge/ui/web/js/deluge-all/preferences/QueuePage.js +++ b/deluge/ui/web/js/deluge-all/preferences/QueuePage.js @@ -102,6 +102,15 @@ Deluge.preferences.Queue = Ext.extend(Ext.form.FormPanel, { boxLabel: _('Ignore slow torrents'), }) ); + om.bind( + 'announce_to_all_trackers', + fieldset.add({ + xtype: 'checkbox', + name: 'announce_to_all_trackers', + hideLabel: true, + boxLabel: _('Announce to all trackers of the same tier'), + }) + ); om.bind( 'auto_manage_prefer_seeds', fieldset.add({