diff --git a/.gitignore b/.gitignore
index 7217712..c39277d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
-_SYNCAPP/metadata.xml
\ No newline at end of file
+_SYNCAPP/metadata.xml
+src/tr-web-control/sftp-config.json
diff --git a/src/tr-web-control/template/dialog-torrent-add.html b/src/tr-web-control/template/dialog-torrent-add.html
index 58dac23..6154914 100644
--- a/src/tr-web-control/template/dialog-torrent-add.html
+++ b/src/tr-web-control/template/dialog-torrent-add.html
@@ -75,6 +75,8 @@
{
$("").text(system.downloadDir).val(system.downloadDir).attr("selected",true).appendTo(thisDialog.find("#download-dir"));
}
+
+ thisDialog.find("#chkautostart").prop("checked", system.serverConfig["start-added-torrents"]);
thisDialog.find("#download-dir").combobox();
// 确认
thisDialog.find("#torrent-button-ok").click(function()
@@ -85,6 +87,20 @@
var isupload = thisDialog.find("#torrent_upload_file")[0].value!="";
var autostart = thisDialog.find("#chkautostart").prop("checked");
+ if (autostart!=system.serverConfig["start-added-torrents"])
+ {
+ system.serverConfig["start-added-torrents"] = autostart;
+ // 开始设置参数
+ transmission.exec(
+ {
+ method:"session-set"
+ ,arguments: {
+ "start-added-torrents": autostart
+ }
+ }
+ );
+ }
+
var button = $(this);
var icon = button.linkbutton("options").iconCls;
button.linkbutton({disabled:true,iconCls:"icon-loading"});
diff --git a/src/tr-web-control/template/dialog-torrent-addfile.html b/src/tr-web-control/template/dialog-torrent-addfile.html
index b324eb3..6b72a41 100644
--- a/src/tr-web-control/template/dialog-torrent-addfile.html
+++ b/src/tr-web-control/template/dialog-torrent-addfile.html
@@ -69,6 +69,8 @@
$("").text((i+1)+"."+item.name).appendTo(thisDialog.find("#torrent_upload_file"));
});
+ thisDialog.find("#chkautostart").prop("checked", system.serverConfig["start-added-torrents"]);
+
// 确认
thisDialog.find("#torrent-button-ok").click(function()
{
@@ -83,6 +85,20 @@
return;
}
+ if (autostart!=system.serverConfig["start-added-torrents"])
+ {
+ system.serverConfig["start-added-torrents"] = autostart;
+ // 开始设置参数
+ transmission.exec(
+ {
+ method:"session-set"
+ ,arguments: {
+ "start-added-torrents": autostart
+ }
+ }
+ );
+ }
+
button.linkbutton({disabled:true});
if (thisDialog.find("#set-default-download-dir").prop("checked")&&isnewdir)