diff --git a/deluge/ui/web/js/deluge-all/EditTrackersWindow.js b/deluge/ui/web/js/deluge-all/EditTrackersWindow.js index 178fd583f6..af4e1fb02d 100644 --- a/deluge/ui/web/js/deluge-all/EditTrackersWindow.js +++ b/deluge/ui/web/js/deluge-all/EditTrackersWindow.js @@ -171,10 +171,12 @@ Deluge.EditTrackersWindow = Ext.extend(Ext.Window, { }); }, this); - deluge.client.core.set_torrent_trackers(this.torrentId, trackers, { - failure: this.onSaveFail, - scope: this, - }); + for (var i in this.torrentIds) { + deluge.client.core.set_torrent_trackers(this.torrentIds[i], trackers, { + failure: this.onSaveFail, + scope: this, + }); + } this.hide(); }, @@ -199,10 +201,13 @@ Deluge.EditTrackersWindow = Ext.extend(Ext.Window, { } }, + show: function (ids) { + this.torrentIds = ids; + Deluge.EditTrackersWindow.superclass.show.call(this); + }, onShow: function () { this.panel.getBottomToolbar().items.get(4).disable(); var r = deluge.torrents.getSelected(); - this.torrentId = r.id; deluge.client.core.get_torrent_status(r.id, ['trackers'], { success: this.onRequestComplete, scope: this, diff --git a/deluge/ui/web/js/deluge-all/Menus.js b/deluge/ui/web/js/deluge-all/Menus.js index 34550a614d..4da304f42f 100644 --- a/deluge/ui/web/js/deluge-all/Menus.js +++ b/deluge/ui/web/js/deluge-all/Menus.js @@ -35,7 +35,7 @@ deluge.menus = { deluge.copyMagnetWindow.show(); break; case 'edit_trackers': - deluge.editTrackers.show(); + deluge.editTrackers.show(ids); break; case 'remove': deluge.removeWindow.show(ids);