mirror of
https://github.com/zoriya/flood.git
synced 2026-06-08 04:41:03 +00:00
Add torrent priority meter
This commit is contained in:
+29
-1
@@ -184,7 +184,7 @@ var client = {
|
||||
});
|
||||
},
|
||||
|
||||
setPriority: function (hash, data, callback) {
|
||||
setFilePriority: function (hash, data, callback) {
|
||||
// TODO Add support for multiple hashes.
|
||||
var fileIndex = data.fileIndices[0];
|
||||
|
||||
@@ -214,6 +214,34 @@ var client = {
|
||||
});
|
||||
},
|
||||
|
||||
setPriority: function (hash, data, callback) {
|
||||
// TODO Add support for multiple hashes.
|
||||
var multicall = [
|
||||
[
|
||||
{
|
||||
methodName: 'd.set_priority',
|
||||
params: [
|
||||
hash,
|
||||
data.priority
|
||||
]
|
||||
},
|
||||
{
|
||||
methodName: 'd.update_priorities',
|
||||
params: [
|
||||
hash
|
||||
]
|
||||
}
|
||||
]
|
||||
];
|
||||
|
||||
rTorrent.get('system.multicall', multicall)
|
||||
.then(function(data) {
|
||||
callback(null, data);
|
||||
}, function(error) {
|
||||
callback(error, null);
|
||||
});
|
||||
},
|
||||
|
||||
setSpeedLimits: function(data, callback) {
|
||||
var methodName = 'throttle.global_down.max_rate.set';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user