mirror of
https://github.com/ronggang/transmission-web-control.git
synced 2024-09-20 14:55:49 +00:00
parent
fdb2889fca
commit
cbfb3d5564
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
_SYNCAPP/metadata.xml
|
||||
_SYNCAPP/metadata.xml
|
||||
src/tr-web-control/sftp-config.json
|
||||
|
|
|
@ -75,6 +75,8 @@
|
|||
{
|
||||
$("<option/>").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"});
|
||||
|
|
|
@ -69,6 +69,8 @@
|
|||
$("<option/>").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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user