mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 04:18:39 +00:00
(trunk web) 'Start when added' checkbox when adding torrents. Patch from Grub (with fixes). Fixes #2295.
This commit is contained in:
@@ -1410,6 +1410,7 @@ Transmission.prototype =
|
||||
if (! confirmed) {
|
||||
$('input#torrent_upload_file').attr('value', '');
|
||||
$('input#torrent_upload_url').attr('value', '');
|
||||
$('input#torrent_auto_start').attr('checked', this[Prefs._AutoStart]);
|
||||
$('#upload_container').show();
|
||||
if (!iPhone && Safari3) {
|
||||
setTimeout("$('div#upload_container div.dialog_window').css('top', '0px');",10);
|
||||
@@ -1419,10 +1420,11 @@ Transmission.prototype =
|
||||
} else {
|
||||
var tr = this;
|
||||
var args = { };
|
||||
var paused = !$('#torrent_auto_start').is(':checked');
|
||||
if ('' != $('#torrent_upload_url').val()) {
|
||||
tr.remote.addTorrentByUrl($('#torrent_upload_url').val(), { paused: !this[Prefs._AutoStart] });
|
||||
tr.remote.addTorrentByUrl($('#torrent_upload_url').val(), { paused: paused });
|
||||
} else {
|
||||
args.url = '/transmission/upload?paused=' + (this[Prefs._AutoStart] ? 'false' : 'true');
|
||||
args.url = '/transmission/upload?paused=' + paused;
|
||||
args.type = 'POST';
|
||||
args.data = { 'X-Transmission-Session-Id' : tr.remote._token };
|
||||
args.dataType = 'xml';
|
||||
|
||||
@@ -205,7 +205,7 @@ TransmissionRemote.prototype =
|
||||
var o = {
|
||||
method: 'torrent-add',
|
||||
arguments: {
|
||||
paused: (options.paused ? 'true' : 'false'),
|
||||
paused: (options.paused),
|
||||
filename: url
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user