Expose opt to use path as basePath in moveTorrents

This commit is contained in:
nVitius
2017-04-30 23:10:08 -07:00
parent 112ba57d98
commit 20ed015025
2 changed files with 10 additions and 2 deletions

View File

@@ -272,8 +272,15 @@ class ClientRequest {
setDownloadPath(options) {
let hashes = this.getEnsuredArray(options.hashes);
let pathMethod;
if (options.isBasePath) {
pathMethod = 'd.directory_base.set';
} else {
pathMethod = 'd.directory.set'
}
hashes.forEach((hash) => {
this.requests.push(this.getMethodCall('d.directory.set',
this.requests.push(this.getMethodCall(pathMethod,
[hash, options.path]));
this.requests.push(this.getMethodCall('d.open', [hash]));
this.requests.push(this.getMethodCall('d.close', [hash]));