mirror of
https://github.com/zoriya/flood.git
synced 2026-05-29 09:41:49 +00:00
API: rename /file-priority API
This commit is contained in:
@@ -227,12 +227,12 @@ class ClientRequest {
|
||||
}
|
||||
|
||||
setFilePriority(options) {
|
||||
const fileIndices = getEnsuredArray(options.fileIndices);
|
||||
const indices = getEnsuredArray(options.indices);
|
||||
const hashes = getEnsuredArray(options.hashes);
|
||||
|
||||
hashes.forEach((hash) => {
|
||||
fileIndices.forEach((fileIndex) => {
|
||||
this.requests.push(getMethodCall('f.priority.set', [`${hash}:f${fileIndex}`, options.priority]));
|
||||
indices.forEach((index) => {
|
||||
this.requests.push(getMethodCall('f.priority.set', [`${hash}:f${index}`, options.priority]));
|
||||
});
|
||||
this.requests.push(getMethodCall('d.update_priorities', [hash]));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user