Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support announcing to all trackers of the same tier. #319

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions deluge/core/preferencesmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
'max_active_downloading': 3,
'max_active_limit': 8,
'dont_count_slow_torrents': False,
'announce_to_all_trackers': True,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should default to False

'queue_new_to_top': False,
'stop_seed_at_ratio': False,
'remove_seed_at_ratio': False,
Expand Down Expand Up @@ -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..')
Expand Down
5 changes: 5 additions & 0 deletions deluge/ui/console/modes/preferences/preference_panes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
12 changes: 12 additions & 0 deletions deluge/ui/gtk3/glade/preferences_dialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -2204,6 +2204,18 @@ used sparingly.</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="chk_announce_to_all_trackers">
<property name="label" translatable="yes">Announce to all trackers of the same tier</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="chk_auto_manage_prefer_seeds">
<property name="label" translatable="yes">Prefer seeding torrents</property>
Expand Down
4 changes: 4 additions & 0 deletions deluge/ui/gtk3/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down Expand Up @@ -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()
Expand Down
9 changes: 9 additions & 0 deletions deluge/ui/web/js/deluge-all/preferences/QueuePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down