diff --git a/server/models/ClientRequest.js b/server/models/ClientRequest.js index e82897ec..f115f6e2 100644 --- a/server/models/ClientRequest.js +++ b/server/models/ClientRequest.js @@ -78,9 +78,8 @@ class ClientRequest { .catch(this.handleError.bind(this)); } - // rTorrent method calls. // TODO: Separate these and add support for additional clients. - + // rTorrent method calls. addFilesMethodCall(options) { let files = this.getEnsuredArray(options.files); @@ -133,6 +132,16 @@ class ClientRequest { this.requests.push(this.getMethodCall('t.multicall', trackerParams)); } + getTorrentListMethodCall(options) { + this.requests.push(this.getMethodCall('d.multicall2', options.props)); + } + + getTransferDataMethodCall(options) { + Object.keys(rTorrentPropMap.transferData).forEach((key) => { + this.requests.push(this.getMethodCall(rTorrentPropMap.transferData[key])); + }); + } + listMethodsMethodCall(options) { let args = this.getEnsuredArray(options.args); this.requests.push(this.getMethodCall(options.method, [args])); @@ -198,16 +207,6 @@ class ClientRequest { this.requests.push(this.getMethodCall('d.close', [hash])); }); } - - getTransferDataMethodCall(options) { - Object.keys(rTorrentPropMap.transferData).forEach((key) => { - this.requests.push(this.getMethodCall(rTorrentPropMap.transferData[key])); - }); - } - - getTorrentListMethodCall(options) { - this.requests.push(this.getMethodCall('d.multicall2', options.props)); - } } module.exports = ClientRequest;