Merge branch 'master' into feature-contextmenu
This commit is contained in:
commit
517cc4305c
|
@ -36,7 +36,7 @@ Latest Release: [https://github.com/mayswind/AriaNg/releases](https://github.com
|
||||||
Latest Daily Build: [https://github.com/mayswind/AriaNg-DailyBuild/archive/master.zip](https://github.com/mayswind/AriaNg-DailyBuild/archive/master.zip)
|
Latest Daily Build: [https://github.com/mayswind/AriaNg-DailyBuild/archive/master.zip](https://github.com/mayswind/AriaNg-DailyBuild/archive/master.zip)
|
||||||
|
|
||||||
#### Building from source
|
#### Building from source
|
||||||
Make sure you have [Node.js](https://nodejs.org/), [NPM](https://www.npmjs.com/) and [Bower](https://bower.io/) installed. Then download the source code, and follow these steps.
|
Make sure you have [Node.js](https://nodejs.org/), [NPM](https://www.npmjs.com/), [Gulp](https://gulpjs.com/) and [Bower](https://bower.io/) installed. Then download the source code, and follow these steps.
|
||||||
|
|
||||||
$ npm install
|
$ npm install
|
||||||
$ bower install
|
$ bower install
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
},
|
},
|
||||||
"name": "ariang",
|
"name": "ariang",
|
||||||
"description": "AriaNg, a modern web frontend making aria2 easier to use.",
|
"description": "AriaNg, a modern web frontend making aria2 easier to use.",
|
||||||
"version": "0.3.0",
|
"version": "0.4.0",
|
||||||
"main": "index.html",
|
"main": "index.html",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 0"
|
"test": "echo \"Error: no test specified\" && exit 0"
|
||||||
|
|
|
@ -410,6 +410,8 @@ bt-force-encryption.name=强制加密
|
||||||
bt-force-encryption.description=BT 消息中的内容需要使用 arc4 加密. 此选项是设置 --bt-require-crypto --bt-min-crypto-level=arc4 这两个选项的快捷方式. 此选项不会修改上述两个选项的内容. 如果设置为"是", 将拒绝以前的 BT 握手, 并仅使用模糊握手及加密消息.
|
bt-force-encryption.description=BT 消息中的内容需要使用 arc4 加密. 此选项是设置 --bt-require-crypto --bt-min-crypto-level=arc4 这两个选项的快捷方式. 此选项不会修改上述两个选项的内容. 如果设置为"是", 将拒绝以前的 BT 握手, 并仅使用模糊握手及加密消息.
|
||||||
bt-hash-check-seed.name=做种前检查文件哈希
|
bt-hash-check-seed.name=做种前检查文件哈希
|
||||||
bt-hash-check-seed.description=如果设置为"是", 当使用 --check-integrity 选项完成哈希检查及文件完成后才继续做种. 如果您希望仅当文件损坏或未完成时检查文件, 请设置为"否". 此选项仅对 BT 下载有效
|
bt-hash-check-seed.description=如果设置为"是", 当使用 --check-integrity 选项完成哈希检查及文件完成后才继续做种. 如果您希望仅当文件损坏或未完成时检查文件, 请设置为"否". 此选项仅对 BT 下载有效
|
||||||
|
bt-load-saved-metadata.name=加载已保存的元数据文件
|
||||||
|
bt-load-saved-metadata.description=当使用磁链下载时, 在从 DHT 获取种子元数据之前, 首先尝试加载使用 --bt-save-metadata 选项保存的文件. 如果文件加载成功, 则不会从 DHT 下载元数据.
|
||||||
bt-max-open-files.name=最多打开文件数
|
bt-max-open-files.name=最多打开文件数
|
||||||
bt-max-open-files.description=设置 BT/Metalink 下载全局打开的最大文件数.
|
bt-max-open-files.description=设置 BT/Metalink 下载全局打开的最大文件数.
|
||||||
bt-max-peers.name=最大连接节点数
|
bt-max-peers.name=最大连接节点数
|
||||||
|
@ -464,6 +466,8 @@ max-upload-limit.name=最大上传速度
|
||||||
max-upload-limit.description=设置每个任务的最大上传速度 (字节/秒). 0 表示不限制. 您可以增加数值的单位 K 或 M (1K = 1024, 1M = 1024K).
|
max-upload-limit.description=设置每个任务的最大上传速度 (字节/秒). 0 表示不限制. 您可以增加数值的单位 K 或 M (1K = 1024, 1M = 1024K).
|
||||||
peer-id-prefix.name=节点 ID 前缀
|
peer-id-prefix.name=节点 ID 前缀
|
||||||
peer-id-prefix.description=指定节点 ID 的前缀. BT 中节点 ID 长度为 20 字节. 如果超过 20 字节, 将仅使用前 20 字节. 如果少于 20 字节, 将在其后不足随机的数据保证为 20 字节.
|
peer-id-prefix.description=指定节点 ID 的前缀. BT 中节点 ID 长度为 20 字节. 如果超过 20 字节, 将仅使用前 20 字节. 如果少于 20 字节, 将在其后不足随机的数据保证为 20 字节.
|
||||||
|
peer-agent.name=Peer Agent
|
||||||
|
peer-agent.description=指定 BT 扩展握手期间用于节点客户端版本的字符串.
|
||||||
seed-ratio.name=最小分享率
|
seed-ratio.name=最小分享率
|
||||||
seed-ratio.description=指定分享率. 当分享率达到此选项设置的值时会完成做种. 强烈建议您将此选项设置为大于等于 1.0. 如果您想不限制分享比率, 可以设置为 0.0. 如果同时设置了 --seed-time 选项, 当任意一个条件满足时将停止做种.
|
seed-ratio.description=指定分享率. 当分享率达到此选项设置的值时会完成做种. 强烈建议您将此选项设置为大于等于 1.0. 如果您想不限制分享比率, 可以设置为 0.0. 如果同时设置了 --seed-time 选项, 当任意一个条件满足时将停止做种.
|
||||||
seed-time.name=最小做种时间
|
seed-time.name=最小做种时间
|
||||||
|
|
|
@ -410,6 +410,8 @@ bt-force-encryption.name=強制加密
|
||||||
bt-force-encryption.description=BT 消息中的內容需要使用 arc4 加密. 此選項是設置 --bt-require-crypto --bt-min-crypto-level=arc4 這兩個選項的快捷方式. 此選項不會修改上述兩個選項的內容. 如果設置為"是", 將拒絕以前的 BT 握手, 並僅使用模糊握手及加密消息.
|
bt-force-encryption.description=BT 消息中的內容需要使用 arc4 加密. 此選項是設置 --bt-require-crypto --bt-min-crypto-level=arc4 這兩個選項的快捷方式. 此選項不會修改上述兩個選項的內容. 如果設置為"是", 將拒絕以前的 BT 握手, 並僅使用模糊握手及加密消息.
|
||||||
bt-hash-check-seed.name=做種前檢查文件哈希
|
bt-hash-check-seed.name=做種前檢查文件哈希
|
||||||
bt-hash-check-seed.description=如果設置為"是", 當使用 --check-integrity 選項完成哈希檢查及文件完成後才繼續做種. 如果您希望僅當文件損壞或未完成時檢查文件, 請設置為"否". 此選項僅對 BT 下載有效
|
bt-hash-check-seed.description=如果設置為"是", 當使用 --check-integrity 選項完成哈希檢查及文件完成後才繼續做種. 如果您希望僅當文件損壞或未完成時檢查文件, 請設置為"否". 此選項僅對 BT 下載有效
|
||||||
|
bt-load-saved-metadata.name=加載已保存的元數據文件
|
||||||
|
bt-load-saved-metadata.description=當使用磁鏈下載時, 在從 DHT 獲取種子元數據之前, 首先嘗試加載使用 --bt-save-metadata 選項保存的文件. 如果文件加載成功, 則不會從 DHT 下載元數據.
|
||||||
bt-max-open-files.name=最多打開文件數
|
bt-max-open-files.name=最多打開文件數
|
||||||
bt-max-open-files.description=設置 BT/Metalink 下載全局打開的最大文件數.
|
bt-max-open-files.description=設置 BT/Metalink 下載全局打開的最大文件數.
|
||||||
bt-max-peers.name=最大連接節點數
|
bt-max-peers.name=最大連接節點數
|
||||||
|
@ -464,6 +466,8 @@ max-upload-limit.name=最大上傳速度
|
||||||
max-upload-limit.description=設置每個任務的最大上傳速度 (位元組/秒). 0 表示不限制. 您可以增加數值的單位 K 或 M (1K = 1024, 1M = 1024K).
|
max-upload-limit.description=設置每個任務的最大上傳速度 (位元組/秒). 0 表示不限制. 您可以增加數值的單位 K 或 M (1K = 1024, 1M = 1024K).
|
||||||
peer-id-prefix.name=節點 ID 前綴
|
peer-id-prefix.name=節點 ID 前綴
|
||||||
peer-id-prefix.description=指定節點 ID 的前綴. BT 中節點 ID 長度為 20 位元組. 如果超過 20 位元組, 將僅使用前 20 位元組. 如果少於 20 位元組, 將在其後不足隨機的數據保證為 20 位元組.
|
peer-id-prefix.description=指定節點 ID 的前綴. BT 中節點 ID 長度為 20 位元組. 如果超過 20 位元組, 將僅使用前 20 位元組. 如果少於 20 位元組, 將在其後不足隨機的數據保證為 20 位元組.
|
||||||
|
peer-agent.name=Peer Agent
|
||||||
|
peer-agent.description=指定 BT 擴展握手期間用於節點客戶端版本的字符串.
|
||||||
seed-ratio.name=最小分享率
|
seed-ratio.name=最小分享率
|
||||||
seed-ratio.description=指定分享率. 當分享率達到此選項設置的值時會完成做種. 強烈建議您將此選項設置為大於等於 1.0. 如果您想不限制分享比率, 可以設置為 0.0. 如果同時設置了 --seed-time 選項, 當任意一個條件滿足時將停止做種.
|
seed-ratio.description=指定分享率. 當分享率達到此選項設置的值時會完成做種. 強烈建議您將此選項設置為大於等於 1.0. 如果您想不限制分享比率, 可以設置為 0.0. 如果同時設置了 --seed-time 選項, 當任意一個條件滿足時將停止做種.
|
||||||
seed-time.name=最小做種時間
|
seed-time.name=最小做種時間
|
||||||
|
|
|
@ -316,6 +316,12 @@
|
||||||
defaultValue: 'true',
|
defaultValue: 'true',
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
'bt-load-saved-metadata': {
|
||||||
|
since: '1.33.0',
|
||||||
|
type: 'boolean',
|
||||||
|
defaultValue: 'false',
|
||||||
|
required: true
|
||||||
|
},
|
||||||
'bt-max-open-files': {
|
'bt-max-open-files': {
|
||||||
type: 'integer',
|
type: 'integer',
|
||||||
defaultValue: '100',
|
defaultValue: '100',
|
||||||
|
@ -469,6 +475,12 @@
|
||||||
readonly: true,
|
readonly: true,
|
||||||
defaultValue: 'A2-$MAJOR-$MINOR-$PATCH-'
|
defaultValue: 'A2-$MAJOR-$MINOR-$PATCH-'
|
||||||
},
|
},
|
||||||
|
'peer-agent': {
|
||||||
|
since: '1.33.0',
|
||||||
|
type: 'string',
|
||||||
|
defaultValue: 'aria2/$MAJOR.$MINOR.$PATCH',
|
||||||
|
readonly: true
|
||||||
|
},
|
||||||
'seed-ratio': {
|
'seed-ratio': {
|
||||||
type: 'float',
|
type: 'float',
|
||||||
defaultValue: '1.0',
|
defaultValue: '1.0',
|
||||||
|
@ -839,13 +851,13 @@
|
||||||
],
|
],
|
||||||
btOptions: [
|
btOptions: [
|
||||||
'bt-detach-seed-only', 'bt-enable-hook-after-hash-check', 'bt-enable-lpd', 'bt-exclude-tracker',
|
'bt-detach-seed-only', 'bt-enable-hook-after-hash-check', 'bt-enable-lpd', 'bt-exclude-tracker',
|
||||||
'bt-external-ip', 'bt-force-encryption', 'bt-hash-check-seed', 'bt-max-open-files', 'bt-max-peers',
|
'bt-external-ip', 'bt-force-encryption', 'bt-hash-check-seed', 'bt-load-saved-metadata', 'bt-max-open-files', 'bt-max-peers',
|
||||||
'bt-metadata-only', 'bt-min-crypto-level', 'bt-prioritize-piece', 'bt-remove-unselected-file',
|
'bt-metadata-only', 'bt-min-crypto-level', 'bt-prioritize-piece', 'bt-remove-unselected-file',
|
||||||
'bt-require-crypto', 'bt-request-peer-speed-limit', 'bt-save-metadata', 'bt-seed-unverified',
|
'bt-require-crypto', 'bt-request-peer-speed-limit', 'bt-save-metadata', 'bt-seed-unverified',
|
||||||
'bt-stop-timeout', 'bt-tracker', 'bt-tracker-connect-timeout', 'bt-tracker-interval', 'bt-tracker-timeout',
|
'bt-stop-timeout', 'bt-tracker', 'bt-tracker-connect-timeout', 'bt-tracker-interval', 'bt-tracker-timeout',
|
||||||
'dht-file-path', 'dht-file-path6', 'dht-listen-port', 'dht-message-timeout', 'enable-dht', 'enable-dht6',
|
'dht-file-path', 'dht-file-path6', 'dht-listen-port', 'dht-message-timeout', 'enable-dht', 'enable-dht6',
|
||||||
'enable-peer-exchange', 'follow-torrent', 'listen-port', 'max-overall-upload-limit', 'max-upload-limit',
|
'enable-peer-exchange', 'follow-torrent', 'listen-port', 'max-overall-upload-limit', 'max-upload-limit',
|
||||||
'peer-id-prefix', 'seed-ratio', 'seed-time'
|
'peer-id-prefix', 'peer-agent', 'seed-ratio', 'seed-time'
|
||||||
],
|
],
|
||||||
metalinkOptions: [
|
metalinkOptions: [
|
||||||
'follow-metalink', 'metalink-base-uri', 'metalink-language', 'metalink-location', 'metalink-os',
|
'follow-metalink', 'metalink-base-uri', 'metalink-language', 'metalink-location', 'metalink-os',
|
||||||
|
|
|
@ -429,6 +429,8 @@
|
||||||
'bt-force-encryption.description': 'Requires BitTorrent message payload encryption with arc4. This is a shorthand of --bt-require-crypto --bt-min-crypto-level=arc4. This option does not change the option value of those options. If true is given, deny legacy BitTorrent handshake and only use Obfuscation handshake and always encrypt message payload.',
|
'bt-force-encryption.description': 'Requires BitTorrent message payload encryption with arc4. This is a shorthand of --bt-require-crypto --bt-min-crypto-level=arc4. This option does not change the option value of those options. If true is given, deny legacy BitTorrent handshake and only use Obfuscation handshake and always encrypt message payload.',
|
||||||
'bt-hash-check-seed.name': 'Hash Check Before Seeding',
|
'bt-hash-check-seed.name': 'Hash Check Before Seeding',
|
||||||
'bt-hash-check-seed.description': 'If true is given, after hash check using --check-integrity option and file is complete, continue to seed file. If you want to check file and download it only when it is damaged or incomplete, set this option to false. This option has effect only on BitTorrent download.',
|
'bt-hash-check-seed.description': 'If true is given, after hash check using --check-integrity option and file is complete, continue to seed file. If you want to check file and download it only when it is damaged or incomplete, set this option to false. This option has effect only on BitTorrent download.',
|
||||||
|
'bt-load-saved-metadata.name': 'Load Saved Metadata File',
|
||||||
|
'bt-load-saved-metadata.description': 'Before getting torrent metadata from DHT when downloading with magnet link, first try to read file saved by --bt-save-metadata option. If it is successful, then skip downloading metadata from DHT.',
|
||||||
'bt-max-open-files.name': 'Max Open Files',
|
'bt-max-open-files.name': 'Max Open Files',
|
||||||
'bt-max-open-files.description': 'Specify maximum number of files to open in multi-file BitTorrent/Metalink download globally.',
|
'bt-max-open-files.description': 'Specify maximum number of files to open in multi-file BitTorrent/Metalink download globally.',
|
||||||
'bt-max-peers.name': 'Max Peers',
|
'bt-max-peers.name': 'Max Peers',
|
||||||
|
@ -483,6 +485,8 @@
|
||||||
'max-upload-limit.description': 'Set max upload speed per each torrent in bytes/sec. 0 means unrestricted. You can append K or M (1K = 1024, 1M = 1024K).',
|
'max-upload-limit.description': 'Set max upload speed per each torrent in bytes/sec. 0 means unrestricted. You can append K or M (1K = 1024, 1M = 1024K).',
|
||||||
'peer-id-prefix.name': 'Peer ID Prefix',
|
'peer-id-prefix.name': 'Peer ID Prefix',
|
||||||
'peer-id-prefix.description': 'Specify the prefix of peer ID. The peer ID in BitTorrent is 20 byte length. If more than 20 bytes are specified, only first 20 bytes are used. If less than 20 bytes are specified, random byte data are added to make its length 20 bytes.',
|
'peer-id-prefix.description': 'Specify the prefix of peer ID. The peer ID in BitTorrent is 20 byte length. If more than 20 bytes are specified, only first 20 bytes are used. If less than 20 bytes are specified, random byte data are added to make its length 20 bytes.',
|
||||||
|
'peer-agent.name': 'Peer Agent',
|
||||||
|
'peer-agent.description': 'Specify the string used during the bitorrent extended handshake for the peer’s client version.',
|
||||||
'seed-ratio.name': 'Min Share Ratio',
|
'seed-ratio.name': 'Min Share Ratio',
|
||||||
'seed-ratio.description': 'Specify share ratio. Seed completed torrents until share ratio reaches RATIO. You are strongly encouraged to specify equals or more than 1.0 here. Specify 0.0 if you intend to do seeding regardless of share ratio. If --seed-time option is specified along with this option, seeding ends when at least one of the conditions is satisfied.',
|
'seed-ratio.description': 'Specify share ratio. Seed completed torrents until share ratio reaches RATIO. You are strongly encouraged to specify equals or more than 1.0 here. Specify 0.0 if you intend to do seeding regardless of share ratio. If --seed-time option is specified along with this option, seeding ends when at least one of the conditions is satisfied.',
|
||||||
'seed-time.name': 'Min Seed Time',
|
'seed-time.name': 'Min Seed Time',
|
||||||
|
|
|
@ -5,11 +5,25 @@
|
||||||
var units = [ 'B', 'KB', 'MB', 'GB' ];
|
var units = [ 'B', 'KB', 'MB', 'GB' ];
|
||||||
var defaultFractionSize = 2;
|
var defaultFractionSize = 2;
|
||||||
|
|
||||||
|
var getAutoFractionSize = function (value) {
|
||||||
|
if (value < 1) {
|
||||||
|
return 2;
|
||||||
|
} else if (value < 10) {
|
||||||
|
return 1;
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return function (value, fractionSize) {
|
return function (value, fractionSize) {
|
||||||
var unit = units[0];
|
var unit = units[0];
|
||||||
|
var actualFractionSize = defaultFractionSize;
|
||||||
|
var autoFractionSize = false;
|
||||||
|
|
||||||
if (angular.isUndefined(fractionSize)) {
|
if (angular.isNumber(fractionSize)) {
|
||||||
fractionSize = defaultFractionSize;
|
actualFractionSize = fractionSize;
|
||||||
|
} else if (fractionSize === 'auto') {
|
||||||
|
autoFractionSize = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!value) {
|
if (!value) {
|
||||||
|
@ -29,7 +43,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
value = $filter('number')(value, fractionSize);
|
if (autoFractionSize) {
|
||||||
|
actualFractionSize = getAutoFractionSize(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
value = $filter('number')(value, actualFractionSize);
|
||||||
|
|
||||||
return value + ' ' + unit;
|
return value + ' ' + unit;
|
||||||
};
|
};
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
var uploadSpeed = $filter('readableVolume')(params[0].value) + '/s';
|
var uploadSpeed = $filter('readableVolume')(params[0].value) + '/s';
|
||||||
var downloadSpeed = $filter('readableVolume')(params[1].value) + '/s';
|
var downloadSpeed = $filter('readableVolume')(params[1].value) + '/s';
|
||||||
|
|
||||||
return '<div>' + time + '</div>'
|
return '<div><i class="fa fa-clock-o"></i> ' + time + '</div>'
|
||||||
+ '<div><i class="icon-download fa fa-arrow-down"></i> ' + downloadSpeed +'</div>'
|
+ '<div><i class="icon-download fa fa-arrow-down"></i> ' + downloadSpeed +'</div>'
|
||||||
+ '<div><i class="icon-upload fa fa-arrow-up"></i> ' + uploadSpeed + '</div>';
|
+ '<div><i class="icon-upload fa fa-arrow-up"></i> ' + uploadSpeed + '</div>';
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
type: 'value',
|
type: 'value',
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
formatter: function (value) {
|
formatter: function (value) {
|
||||||
return $filter('readableVolume')(value, 0);
|
return $filter('readableVolume')(value, 'auto');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Reference in a new issue