mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-02-20 13:53:19 +01:00
Add author edit modal & remove from experimental
This commit is contained in:
@@ -64,6 +64,21 @@ class Author {
|
||||
this.updatedAt = Date.now()
|
||||
}
|
||||
|
||||
update(payload) {
|
||||
var json = this.toJSON()
|
||||
delete json.id
|
||||
delete json.addedAt
|
||||
delete json.updatedAt
|
||||
var hasUpdates = false
|
||||
for (const key in json) {
|
||||
if (payload[key] !== undefined && json[key] != payload[key]) {
|
||||
this[key] = payload[key]
|
||||
hasUpdates = true
|
||||
}
|
||||
}
|
||||
return hasUpdates
|
||||
}
|
||||
|
||||
checkNameEquals(name) {
|
||||
if (!name) return false
|
||||
return this.name.toLowerCase() == name.toLowerCase().trim()
|
||||
|
||||
Reference in New Issue
Block a user