mirror of
https://github.com/zoriya/flood.git
synced 2026-06-01 18:47:44 +00:00
Obey 'Start Torrnt' option when adding by file
This commit is contained in:
@@ -22,6 +22,7 @@ var client = {
|
||||
let files = req.files;
|
||||
let path = req.body.destination;
|
||||
let request = new ClientRequest();
|
||||
let start = req.body.start;
|
||||
|
||||
request.add('createDirectory', {path});
|
||||
request.send();
|
||||
@@ -31,7 +32,7 @@ var client = {
|
||||
// torrent files reliably.
|
||||
files.forEach((file, index) => {
|
||||
let fileRequest = new ClientRequest();
|
||||
fileRequest.add('addFiles', {files: file, path});
|
||||
fileRequest.add('addFiles', {files: file, path, start});
|
||||
|
||||
// Set the callback for only the last request.
|
||||
if (index === files.length - 1) {
|
||||
|
||||
Reference in New Issue
Block a user