Wait for .torrent files to finish downloading.
This commit is contained in:
parent
23eef1a058
commit
6e67cae494
1 changed files with 4 additions and 1 deletions
|
|
@ -25,7 +25,10 @@ class FolderWatcher {
|
|||
const glob = `${torrentsFolderPath}/**/*.torrent`
|
||||
log('Folder Watcher: watching: ', glob)
|
||||
|
||||
const options = {ignoreInitial: true}
|
||||
const options = {
|
||||
ignoreInitial: true,
|
||||
awaitWriteFinish: true
|
||||
}
|
||||
this.watcher = chokidar.watch(glob, options)
|
||||
this.watcher
|
||||
.on('add', (path) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue