Update:Changing author name to match another authors name will merge the authors #487

This commit is contained in:
advplyr 2022-07-24 12:00:36 -05:00
parent 217bbb4a8e
commit 6cbfd8679b
3 changed files with 61 additions and 22 deletions

View file

@ -191,6 +191,14 @@ class BookMetadata {
return true
}
replaceAuthor(oldAuthor, newAuthor) {
this.authors = this.authors.filter(au => au.id !== oldAuthor.id) // Remove old author
this.authors.push({
id: newAuthor.id,
name: newAuthor.name
})
}
setData(scanMediaData = {}) {
this.title = scanMediaData.title || null
this.subtitle = scanMediaData.subtitle || null