mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-10 01:15:06 +02:00
New model update details, author and series inputs with create new, compare & copy utils
This commit is contained in:
parent
f2be3bc95e
commit
5f4e5cd3d8
19 changed files with 707 additions and 70 deletions
14
server/Db.js
14
server/Db.js
|
@ -184,6 +184,20 @@ class Db {
|
|||
}
|
||||
}
|
||||
|
||||
async updateLibraryItem(libraryItem) {
|
||||
if (libraryItem && libraryItem.saveMetadata) {
|
||||
await libraryItem.saveMetadata()
|
||||
}
|
||||
|
||||
return this.libraryItemsDb.update((record) => record.id === libraryItem.id, () => libraryItem).then((results) => {
|
||||
Logger.debug(`[DB] Library Item updated ${results.updated}`)
|
||||
return true
|
||||
}).catch((error) => {
|
||||
Logger.error(`[DB] Library Item update failed ${error}`)
|
||||
return false
|
||||
})
|
||||
}
|
||||
|
||||
async updateAudiobook(audiobook) {
|
||||
if (audiobook && audiobook.saveAbMetadata) {
|
||||
// TODO: Book may have updates where this save is not necessary
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue