mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-04 02:05:06 +02:00
Add:Disable watcher library specific #378
This commit is contained in:
parent
aa675422a9
commit
d368988899
3 changed files with 37 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue