mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-12-01 04:34:07 +01:00
Fix merging embedded chapters for multi-track audiobooks giving incorrect chapter ids #3361
- Also trim chapter titles on probe (remove carriage return)
This commit is contained in:
1 parent
0da9a04d8e
commit
64e9ac9d8f
2 files changed
+6
-4
No files matched your search
@@ -143,6 +143,7 @@ function parseChapters(_chapters) {
|
||||
.map((chap) => {
|
||||
let title = chap['TAG:title'] || chap.title || ''
|
||||
if (!title && chap.tags?.title) title = chap.tags.title
|
||||
title = title.trim()
|
||||
|
||||
const timebase = chap.time_base?.includes('/') ? Number(chap.time_base.split('/')[1]) : 1
|
||||
const start = !isNullOrNaN(chap.start_time) ? Number(chap.start_time) : !isNullOrNaN(chap.start) ? Number(chap.start) / timebase : 0
|
||||
|
||||
Reference in new issue
Block a user