mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-04 18:24:46 +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
|
@ -9,6 +9,7 @@ class Library {
|
|||
this.displayOrder = 1
|
||||
this.icon = 'database'
|
||||
this.provider = 'google'
|
||||
this.disableWatcher = false
|
||||
|
||||
this.lastScan = 0
|
||||
|
||||
|
@ -31,6 +32,7 @@ class Library {
|
|||
this.displayOrder = library.displayOrder || 1
|
||||
this.icon = library.icon || 'database'
|
||||
this.provider = library.provider || 'google'
|
||||
this.disableWatcher = !!library.disableWatcher
|
||||
|
||||
this.createdAt = library.createdAt
|
||||
this.lastUpdate = library.lastUpdate
|
||||
|
@ -44,6 +46,7 @@ class Library {
|
|||
displayOrder: this.displayOrder,
|
||||
icon: this.icon,
|
||||
provider: this.provider,
|
||||
disableWatcher: this.disableWatcher,
|
||||
createdAt: this.createdAt,
|
||||
lastUpdate: this.lastUpdate
|
||||
}
|
||||
|
@ -68,6 +71,7 @@ class Library {
|
|||
}
|
||||
this.displayOrder = data.displayOrder || 1
|
||||
this.icon = data.icon || 'database'
|
||||
this.disableWatcher = !!data.disableWatcher
|
||||
this.createdAt = Date.now()
|
||||
this.lastUpdate = Date.now()
|
||||
}
|
||||
|
@ -82,6 +86,10 @@ class Library {
|
|||
this.provider = payload.provider
|
||||
hasUpdates = true
|
||||
}
|
||||
if (payload.disableWatcher !== this.disableWatcher) {
|
||||
this.disableWatcher = !!payload.disableWatcher
|
||||
hasUpdates = true
|
||||
}
|
||||
if (!isNaN(payload.displayOrder) && payload.displayOrder !== this.displayOrder) {
|
||||
this.displayOrder = Number(payload.displayOrder)
|
||||
hasUpdates = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue