mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-11-29 20:02:42 +01:00
Add:Remove all chapters button in chapter editor #1603
This commit is contained in:
1 parent
3656eab8bf
commit
5e5b674c17
12 files changed
+58
-8
No files matched your search
@@ -436,12 +436,12 @@ class LibraryItemController {
|
||||
return res.sendStatus(500)
|
||||
}
|
||||
|
||||
const chapters = req.body.chapters || []
|
||||
if (!chapters.length) {
|
||||
if (!req.body.chapters) {
|
||||
Logger.error(`[LibraryItemController] Invalid payload`)
|
||||
return res.sendStatus(400)
|
||||
}
|
||||
|
||||
const chapters = req.body.chapters || []
|
||||
const wasUpdated = req.libraryItem.media.updateChapters(chapters)
|
||||
if (wasUpdated) {
|
||||
await this.db.updateLibraryItem(req.libraryItem)
|
||||
|
||||
Reference in new issue
Block a user