From 7c3cf23d0e6644b27509c0fe7407c1f6e022ebbb Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Tue, 8 Aug 2023 18:44:18 -0400 Subject: d/p/debian/0005-support_announce_to_all_trackers.patch: Support announcing to all trackers of the same tier. --- .../0005-support_announce_to_all_trackers.patch | 107 +++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 108 insertions(+) create mode 100644 debian/patches/debian/0005-support_announce_to_all_trackers.patch diff --git a/debian/patches/debian/0005-support_announce_to_all_trackers.patch b/debian/patches/debian/0005-support_announce_to_all_trackers.patch new file mode 100644 index 0000000..fb41ee3 --- /dev/null +++ b/debian/patches/debian/0005-support_announce_to_all_trackers.patch @@ -0,0 +1,107 @@ +Description: Support announcing to all trackers of the same tier +Author: Unit 193 + +Bug: http://dev.deluge-torrent.org/ticket/1395 +Forwarded: https://github.com/deluge-torrent/deluge/pull/319 + +--- + deluge/core/preferencesmanager.py | 4 ++++ + deluge/ui/console/modes/preferences/preference_panes.py | 5 +++++ + deluge/ui/gtk3/glade/preferences_dialog.ui | 12 ++++++++++++ + deluge/ui/gtk3/preferences.py | 4 ++++ + deluge/ui/web/js/deluge-all/preferences/QueuePage.js | 9 +++++++++ + 5 files changed, 34 insertions(+) + +--- a/deluge/core/preferencesmanager.py ++++ b/deluge/core/preferencesmanager.py +@@ -85,6 +85,7 @@ DEFAULT_PREFS = { + '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 @@ class PreferencesManager(component.Compo + 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..') +--- a/deluge/ui/console/modes/preferences/preference_panes.py ++++ b/deluge/ui/console/modes/preferences/preference_panes.py +@@ -581,6 +581,11 @@ class QueuePane(BasePreferencePane): + 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', + core_conf['auto_manage_prefer_seeds'], +--- a/deluge/ui/gtk3/glade/preferences_dialog.ui ++++ b/deluge/ui/gtk3/glade/preferences_dialog.ui +@@ -2205,6 +2205,18 @@ used sparingly. + + + ++ ++ Announce to all trackers of the same tier ++ True ++ True ++ False ++ True ++ ++ ++ 2 ++ ++ ++ + + Prefer seeding torrents + True +--- a/deluge/ui/gtk3/preferences.py ++++ b/deluge/ui/gtk3/preferences.py +@@ -421,6 +421,7 @@ class Preferences(component.Component): + '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'), +@@ -836,6 +837,9 @@ class Preferences(component.Component): + 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() +--- a/deluge/ui/web/js/deluge-all/preferences/QueuePage.js ++++ b/deluge/ui/web/js/deluge-all/preferences/QueuePage.js +@@ -103,6 +103,15 @@ Deluge.preferences.Queue = Ext.extend(Ex + }) + ); + 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({ + xtype: 'checkbox', diff --git a/debian/patches/series b/debian/patches/series index 77ccee8..ea9e05a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ debian/0001-release-check.patch debian/0002-setuptools-60.patch #debian/0003-systemd.patch debian/0004-increase_rsa_key_size.patch +debian/0005-support_announce_to_all_trackers.patch -- cgit v1.2.3