mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-14 19:34:57 +02:00
change color of book read icon #105, basic .pdf reader #107, fix: cover path updating properly #102, step forward/backward from book edit modal #100, add all files tab to edit modal #99, select input auto submit on blur #98
This commit is contained in:
parent
315592efe5
commit
03963aa9a1
27 changed files with 545 additions and 54 deletions
|
@ -132,12 +132,18 @@ class Book {
|
|||
update(payload) {
|
||||
var hasUpdates = false
|
||||
|
||||
// Normalize cover paths if passed
|
||||
if (payload.cover) {
|
||||
// If updating to local cover then normalize path
|
||||
if (!payload.cover.startsWith('http:') && !payload.cover.startsWith('https:')) {
|
||||
payload.cover = Path.normalize(payload.cover)
|
||||
if (payload.coverFullPath) payload.coverFullPath = Path.normalize(payload.coverFullPath)
|
||||
else {
|
||||
Logger.warn(`[Book] "${this.title}" updating book cover to "${payload.cover}" but no full path was passed`)
|
||||
}
|
||||
}
|
||||
} else if (payload.coverFullPath) {
|
||||
Logger.warn(`[Book] "${this.title}" updating book full cover path to "${payload.coverFullPath}" but no relative path was passed`)
|
||||
payload.coverFullPath = Path.normalize(payload.coverFullPath)
|
||||
}
|
||||
|
||||
for (const key in payload) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue