增加 当前数据目录为第一候选下载路径

This commit is contained in:
imebeh
2020-03-25 04:07:27 +08:00
parent c1c2437a28
commit 8cfc8bd8f9
3 changed files with 16 additions and 0 deletions

View File

@@ -85,6 +85,8 @@ var system = {
checkedRows: [],
uiIsInitialized: false,
popoverCount: 0,
// 当前数据目录,用于添加任务的快速保存路径选择
currentListDir: "",
/**
* 设置语言
*/
@@ -636,6 +638,7 @@ var system = {
system.loadTorrentToList({
node: node
});
system.currentListDir = node.downDir;
},
lines: true
});
@@ -3000,6 +3003,7 @@ var system = {
this.appendTreeNode(parentkey, [{
id: key,
path: path,
downDir: fullkey,
text: text,
iconCls: "iconfont tr-icon-file"
}]);

View File

@@ -80,6 +80,12 @@
$.merge(downloadDirs,system.dictionary.folders.split("\n"));
}
downloadDirs = uniq(downloadDirs);
if (system.config.hideSubfolders == false && system.currentListDir != null && system.currentListDir != "") {
// 增加 当前数据目录为第一候选
downloadDirs.unshift(system.currentListDir);
}
if (downloadDirs == null)
{
$("<option/>").text(system.downloadDir).val(system.downloadDir).attr("selected",true).appendTo(thisDialog.find("#download-dir"));

View File

@@ -69,6 +69,12 @@
$.merge(downloadDirs,system.dictionary.folders.split("\n"));
}
downloadDirs = uniq(downloadDirs);
if (system.config.hideSubfolders == false && system.currentListDir != null && system.currentListDir != "") {
// 增加 当前数据目录为第一候选
downloadDirs.unshift(system.currentListDir);
}
if (downloadDirs == null)
{
$("<option/>").text(system.downloadDir).val(system.downloadDir).attr("selected",true).appendTo(thisDialog.find("#download-dir"));