Add usePolling option to dirWatch. Needed when monitoring network folders

This commit is contained in:
Chrystian Huot 2020-05-21 08:56:48 -04:00
parent 51c6c5a4ce
commit dce2cd2439
2 changed files with 5 additions and 1 deletions

View file

@ -33,7 +33,10 @@ The *rdioScanner.dirWatch* property an *array* of *dirWatch objects* which descr
// [optional] The type of the audio file
// It can be "default", "sdrtrunk" or "trunk-recorder"
"type": "default"
"type": "default",
// [optional] Set this to true to successfully watch files over a network
"usePolling": true
}
]
}

View file

@ -38,6 +38,7 @@ class DirWatch {
awaitWriteFinish: true,
ignoreInitial: true,
recursive: true,
usePolling: typeof dirWatch.usePolling === 'boolean' ? dirWatch.usePolling : false,
});
watcher.on('add', async (filename) => {