Add:Server setting to disable folder watcher #378

This commit is contained in:
advplyr committed 2022-02-23 17:52:21 -06:00
1 parent 1a89b6e493
commit 7f1fc1901b
4 files changed
+47 -58

No files matched your search

+7 -2
View File
@@ -127,8 +127,13 @@ class Server {
await this.scanner.fixDuplicateIds()
}
this.watcher.initWatcher(this.libraries)
this.watcher.on('files', this.filesChanged.bind(this))
if (this.db.serverSettings.scannerDisableWatcher) {
Logger.info(`[Server] Watcher is disabled`)
this.watcher.disabled = true
} else {
this.watcher.initWatcher(this.libraries)
this.watcher.on('files', this.filesChanged.bind(this))
}
}
async start() {