增加 显示peer和tracker的更多信息 (#391)

* 增加 已连接用户的端口和UTP状态

* 增加 tracker服务器显示更多信息

* 更新 英文语言文件
This commit is contained in:
imebeh 2020-03-28 14:51:38 +08:00 committed by GitHub
parent cca9f06d07
commit e61c05c10b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 60 additions and 8 deletions

View File

@ -370,10 +370,20 @@
"lastAnnounceTime": "AnnounceTime",
"lastAnnounceTimedOut": "TimedOut",
"downloadCount": "Download count",
"nextAnnounceTime": "Next announce"
"nextAnnounceTime": "Next announce",
"leecherCount": "Leecher count",
"seederCount": "Seeder count",
"announceStateText": {
"0": "Inactive",
"1": "Waiting",
"2": "Queued",
"3": "Active"
}
},
"peers-fields": {
"address": "IP address",
"port": "Port",
"isUTP": "UTP enabled",
"clientName": "Client",
"flagStr": "Flag",
"progress": "Progress",

View File

@ -292,6 +292,8 @@
"newname": "新名称"
},
"torrent-attribute-add-tracker": {
"button-search-best-ip": "精选(IP)",
"button-search-all-ip": "全部(IP)",
"title": "增加 Tracker",
"tip": "每行表示一个Tracker"
},
@ -368,11 +370,21 @@
"lastAnnounceSucceeded": "已连接",
"lastAnnounceTime": "更新时间",
"lastAnnounceTimedOut": "超时",
"downloadCount": "总下载数",
"nextAnnounceTime": "下次更新时间"
"downloadCount": "下载数",
"leecherCount": "吸血数",
"seederCount": "种子数",
"nextAnnounceTime": "下次更新时间",
"announceStateText": {
"0": "非活动",
"1": "待机",
"2": "队列中",
"3": "活动中"
}
},
"peers-fields": {
"address": "IP地址",
"port": "端口",
"isUTP": "UTP连接",
"clientName": "客户端",
"flagStr": "标记",
"progress": "完成进度",

View File

@ -288,6 +288,8 @@
"newname": "新名稱"
},
"torrent-attribute-add-tracker": {
"button-search-best-ip": "精選(IP)",
"button-search-all-ip": "全部(IP)",
"title": "新增 Tracker",
"tip": "每行一個 Tracker"
},
@ -354,10 +356,20 @@
"lastAnnounceTime": "更新時間",
"lastAnnounceTimedOut": "超時",
"downloadCount": "下載數",
"nextAnnounceTime": "下次更新時間"
"leecherCount": "吸血數",
"seederCount": "種子數",
"nextAnnounceTime": "下次更新時間",
"announceStateText": {
"0": "非活動",
"1": "待機",
"2": "佇列中",
"3": "活動中"
}
},
"peers-fields": {
"address": "IP 地址",
"port": "連接埠",
"isUTP": "UTP連接",
"clientName": "用戶端",
"flagStr": "標記",
"progress": "進度",

View File

@ -2760,6 +2760,16 @@ var system = {
var rowdata = {};
for (var key in stats) {
switch (key) {
case "downloadCount":
case "leecherCount":
case "seederCount":
rowdata[key] = (stats[key] == -1 ? system.lang["public"]["text-unknown"] : stats[key]);
break;
// state
case "announceState":
rowdata[key] = system.lang.torrent.attribute["servers-fields"]["announceStateText"][stats[key]];
break;
// Dates
case "lastAnnounceTime":
case "nextAnnounceTime":
@ -2797,6 +2807,8 @@ var system = {
for (var key in item) {
rowdata[key] = item[key];
}
// 使用同类已有的翻译文本
rowdata.isUTP = system.lang.torrent.attribute["status"][item.isUTP];
var percentDone = parseFloat(item.progress * 100).toFixed(2);
rowdata.progress = system.getTorrentProgressBar(percentDone, transmission._status.download)
datas.push(rowdata);

View File

@ -28,9 +28,11 @@
background: "#e6e6e6"
});
title = "button-ok,button-cancel".split(",");
title = "button-search-best-ip,button-search-all-ip,button-ok,button-cancel".split(",");
$.each(title, function (i, item) {
thisDialog.find("#torrent-attribute-add-tracker-" + item).html(system.lang.dialog["public"][item]);
thisDialog.find("#torrent-attribute-add-tracker-" + item).html(system.lang.dialog[
"torrent-attribute-add-tracker"][item]);
});
thisDialog.find("#text-nochange").html(system.lang["public"]["text-nochange"]);
@ -83,14 +85,14 @@
thisDialog.find("#torrent-attribute-add-tracker-button-search-best-ip").click(function () {
var trackersURL = "https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best_ip.txt"
$.get(trackersURL,function(data){
$("#txtTrackers").html(data);
$("#txtTrackers").html(data.replace(/[\r\n]+/g,"\n"));
});
});
thisDialog.find("#torrent-attribute-add-tracker-button-search-all-ip").click(function () {
var trackersURL="https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all_ip.txt"
$.get(trackersURL,function(data){
$("#txtTrackers").html(data);
$("#txtTrackers").html(data.replace(/[\r\n]+/g,"\n"));
});
});

View File

@ -10,7 +10,9 @@
{"field":"announce","width":"300"}
,{"field":"announceState","width":"50"}
,{"field":"lastAnnounceResult","width":"180"}
,{"field":"downloadCount","width":"70","align":"left"}
,{"field":"downloadCount","width":"60","align":"left"}
,{"field":"leecherCount","width":"60","align":"left"}
,{"field":"seederCount","width":"60","align":"left"}
,{"field":"lastAnnounceSucceeded","width":"60","align":"center"}
,{"field":"lastAnnounceTime","width":"120","align":"center"}
,{"field":"lastAnnounceTimedOut","width":"60","align":"center"}

View File

@ -7,6 +7,8 @@
}
,"fields":[
{"field":"address","width":"260"}
,{"field":"port","width":"60"}
,{"field":"isUTP","width":"60","align":"center"}
,{"field":"clientName","width":"120"}
,{"field":"flagStr","width":"60"}
,{"field":"progress","width":"70","align":"center"}