mirror of
https://github.com/ronggang/transmission-web-control.git
synced 2025-04-18 19:14:27 +00:00
commit
cca9f06d07
|
@ -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
|
||||
});
|
||||
|
@ -2595,7 +2598,9 @@ var system = {
|
|||
}
|
||||
|
||||
torrent.completeSize = (torrent.totalSize - torrent.leftUntilDone);
|
||||
torrent.moreInfosTag = true;
|
||||
if (("files" in torrent) && torrent.files.length > 0) {
|
||||
torrent.moreInfosTag = true;
|
||||
}
|
||||
system.fillTorrentBaseInfos(torrent);
|
||||
system.fillTorrentFileList(torrent);
|
||||
system.fillTorrentServerList(torrent);
|
||||
|
@ -2998,6 +3003,7 @@ var system = {
|
|||
this.appendTreeNode(parentkey, [{
|
||||
id: key,
|
||||
path: path,
|
||||
downDir: fullkey,
|
||||
text: text,
|
||||
iconCls: "iconfont tr-icon-file"
|
||||
}]);
|
||||
|
|
|
@ -16,7 +16,7 @@ transmission.torrents = {
|
|||
pausedTorrentCount: 0,
|
||||
fields: {
|
||||
base: "id,name,status,hashString,totalSize,percentDone,addedDate,trackerStats,leftUntilDone,rateDownload,rateUpload,recheckProgress" + ",rateDownload,rateUpload,peersGettingFromUs,peersSendingToUs,uploadRatio,uploadedEver,downloadedEver,downloadDir,error,errorString,doneDate,queuePosition,activityDate",
|
||||
status: "id,status,percentDone,trackerStats,leftUntilDone,rateDownload,rateUpload" + ",rateDownload,rateUpload,peersGettingFromUs,peersSendingToUs,uploadRatio,uploadedEver,downloadedEver,error,errorString,doneDate,queuePosition,activityDate",
|
||||
status: "id,name,status,totalSize,percentDone,trackerStats,leftUntilDone,rateDownload,rateUpload" + ",rateDownload,rateUpload,peersGettingFromUs,peersSendingToUs,uploadRatio,uploadedEver,downloadedEver,error,errorString,doneDate,queuePosition,activityDate",
|
||||
config: "downloadLimit,downloadLimited,peer-limit,seedIdleLimit,seedIdleMode,seedRatioLimit,seedRatioMode,uploadLimit,uploadLimited"
|
||||
},
|
||||
// List of all the torrents that have been acquired
|
||||
|
@ -296,7 +296,11 @@ transmission.torrents = {
|
|||
}
|
||||
|
||||
if (warnings.length == trackerStats.length) {
|
||||
item["warning"] = warnings.join(";");
|
||||
if ((warnings.join(";")).replace(/;/g,"") == ""){
|
||||
item["warning"] = "";
|
||||
} else {
|
||||
item["warning"] = warnings.join(";");
|
||||
}
|
||||
// 设置下次更新时间
|
||||
if (!item["nextAnnounceTime"])
|
||||
item["nextAnnounceTime"] = trackerInfo.nextAnnounceTime;
|
||||
|
|
|
@ -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"));
|
||||
|
|
|
@ -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"));
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
return;
|
||||
}
|
||||
|
||||
torrent.moreInfosTag = false;
|
||||
system.reloadTorrentBaseInfos(data.arguments.id, ["name"]);
|
||||
thisDialog.dialog("close");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user