From 3d4971f89e8b0f7f9708c37041e960e60a449eb0 Mon Sep 17 00:00:00 2001 From: imebeh Date: Mon, 23 Mar 2020 01:40:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A3=81=E5=8A=9B=E9=93=BE?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E4=B8=8D=E6=9B=B4=E6=96=B0=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 活跃任务信息增加 `name`、`totalSize` 字段 2. 是否更新更多的任务信息根据文件列表是否为空来判断 --- src/tr-web-control/script/system.js | 4 +++- src/tr-web-control/script/transmission.torrents.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tr-web-control/script/system.js b/src/tr-web-control/script/system.js index 8af1a8e..64753b4 100644 --- a/src/tr-web-control/script/system.js +++ b/src/tr-web-control/script/system.js @@ -2595,7 +2595,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); diff --git a/src/tr-web-control/script/transmission.torrents.js b/src/tr-web-control/script/transmission.torrents.js index cb54c03..d6f5251 100644 --- a/src/tr-web-control/script/transmission.torrents.js +++ b/src/tr-web-control/script/transmission.torrents.js @@ -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