mirror of
https://github.com/chuot/rdio-scanner.git
synced 2026-08-13 16:33:01 -06:00
Add usePolling option to dirWatch. Needed when monitoring network folders
This commit is contained in:
parent
51c6c5a4ce
commit
dce2cd2439
|
|
@ -33,7 +33,10 @@ The *rdioScanner.dirWatch* property an *array* of *dirWatch objects* which descr
|
||||||
|
|
||||||
// [optional] The type of the audio file
|
// [optional] The type of the audio file
|
||||||
// It can be "default", "sdrtrunk" or "trunk-recorder"
|
// 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
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ class DirWatch {
|
||||||
awaitWriteFinish: true,
|
awaitWriteFinish: true,
|
||||||
ignoreInitial: true,
|
ignoreInitial: true,
|
||||||
recursive: true,
|
recursive: true,
|
||||||
|
usePolling: typeof dirWatch.usePolling === 'boolean' ? dirWatch.usePolling : false,
|
||||||
});
|
});
|
||||||
|
|
||||||
watcher.on('add', async (filename) => {
|
watcher.on('add', async (filename) => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue