mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-31 07:09:55 +02:00
Fix:Changing author name not updating library item metadata files #3060
This commit is contained in:
parent
8cadaa57f6
commit
56c0124c13
3 changed files with 106 additions and 13 deletions
|
@ -23,6 +23,20 @@ class BookAuthor extends Model {
|
|||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Get number of books for author
|
||||
*
|
||||
* @param {string} authorId
|
||||
* @returns {Promise<number>}
|
||||
*/
|
||||
static getCountForAuthor(authorId) {
|
||||
return this.count({
|
||||
where: {
|
||||
authorId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize model
|
||||
* @param {import('../Database').sequelize} sequelize
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue