mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-30 04:25:03 +02:00
Fix listener for audiobook updates in edit modal, add remove cover button
This commit is contained in:
parent
63cae5b0ed
commit
93c78a672c
9 changed files with 96 additions and 51 deletions
|
@ -247,7 +247,7 @@ class Scanner {
|
|||
}
|
||||
var results = await this.bookFinder.findCovers('openlibrary', audiobook.title, audiobook.author, options)
|
||||
if (results.length) {
|
||||
Logger.info(`[Scanner] Found best cover for "${audiobook.title}"`)
|
||||
Logger.debug(`[Scanner] Found best cover for "${audiobook.title}"`)
|
||||
audiobook.book.cover = results[0]
|
||||
await this.db.updateAudiobook(audiobook)
|
||||
found++
|
||||
|
@ -294,7 +294,10 @@ class Scanner {
|
|||
|
||||
async findCovers(req, res) {
|
||||
var query = req.query
|
||||
var result = await this.bookFinder.findCovers(query.provider, query.title, query.author || null)
|
||||
var options = {
|
||||
fallbackTitleOnly: !!query.fallbackTitleOnly
|
||||
}
|
||||
var result = await this.bookFinder.findCovers(query.provider, query.title, query.author || null, options)
|
||||
res.json(result)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue