Fix:Updating author name to update author name on each library item

This commit is contained in:
advplyr 2022-03-18 09:38:36 -05:00
parent f00b120e96
commit 69fcb103e4
2 changed files with 25 additions and 1 deletions

View file

@ -140,6 +140,14 @@ class BookMetadata {
return hasUpdates
}
// Updates author name
updateAuthor(updatedAuthor) {
var author = this.authors.find(au => au.id === updatedAuthor.id)
if (!author || author.name == updatedAuthor.name) return false
author.name = updatedAuthor.name
return true
}
setData(scanMediaData = {}) {
this.title = scanMediaData.title || null
this.subtitle = scanMediaData.subtitle || null