mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-01 16:54:59 +02:00
Add author edit modal & remove from experimental
This commit is contained in:
parent
deea6702f0
commit
4c2ad3ede5
26 changed files with 344 additions and 131 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue