Merge pull request #388 from imebeh/master

修复磁力链任务不更新任务信息
This commit is contained in:
栽培者 2020-03-26 12:11:59 +08:00 committed by GitHub
commit cca9f06d07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 3 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
});
@ -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"
}]);

View 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;

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"));

View File

@ -65,6 +65,7 @@
return;
}
torrent.moreInfosTag = false;
system.reloadTorrentBaseInfos(data.arguments.id, ["name"]);
thisDialog.dialog("close");
}