Add:Disable watcher library specific #378

This commit is contained in:
advplyr 2022-02-26 16:34:54 -06:00
parent aa675422a9
commit d368988899
3 changed files with 37 additions and 10 deletions

View file

@ -68,17 +68,19 @@ class FolderWatcher extends EventEmitter {
initWatcher(libraries) {
libraries.forEach((lib) => {
this.buildLibraryWatcher(lib)
if (!lib.disableWatcher) {
this.buildLibraryWatcher(lib)
}
})
}
addLibrary(library) {
if (this.disabled) return
if (this.disabled || library.disableWatcher) return
this.buildLibraryWatcher(library)
}
updateLibrary(library) {
if (this.disabled) return
if (this.disabled || library.disableWatcher) return
var libwatcher = this.libraryWatchers.find(lib => lib.id === library.id)
if (libwatcher) {
libwatcher.name = library.name