Skip to content

Commit 8d9d7b6

Browse files
WebUI: "apply to existing torrents" - light refactoring
1 parent 499902d commit 8d9d7b6

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

defaulttrackers/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@ def get_config(self):
153153
return self.config.config
154154

155155
@export
156-
def apply_existing(self):
157-
"""Apply trackerlist to existings torrents"""
158-
156+
def apply_to_existing(self):
157+
"""Apply the tracker list to existings torrents"""
158+
159159
for torrent_id in component.get("TorrentManager").torrents:
160160
self.on_torrent_added(torrent_id)
161161
return True

defaulttrackers/data/defaulttrackers.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,18 @@ DefaultTrackersPanel = Ext.extend(Ext.form.FormPanel, {
8585
autoWidth: true,
8686
}));
8787

88-
var applyExisting = this.add({
88+
var applyToExisting = this.add({
8989
fieldLabel: _(''),
9090
name: 'trackers_apply',
9191
xtype: 'container',
9292
layout: 'hbox',
9393
items: [{
9494
xtype: 'button',
95-
text: 'Apply Existing Torrents',
95+
text: 'Apply to existing torrents',
9696
}]
9797
});
9898

99-
applyExisting.getComponent(0).setHandler(this.onApplyExisting, this);
99+
applyToExisting.getComponent(0).setHandler(this.onApplyToExisting, this);
100100

101101
deluge.preferences.on('show', this.onPreferencesShow, this);
102102
},
@@ -132,8 +132,8 @@ DefaultTrackersPanel = Ext.extend(Ext.form.FormPanel, {
132132
onSetConfig: function() {
133133
this.opts.commit();
134134
},
135-
onApplyExisting: function() {
136-
deluge.client.defaulttrackers.apply_existing({
135+
onApplyToExisting: function() {
136+
deluge.client.defaulttrackers.apply_to_existing({
137137
success: function() {
138138
Ext.Msg.alert('Success', 'Default trackers applied to existing torrents');
139139
},

egg/DefaultTrackers-0.6-py3.12.egg

-39.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)