mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-08 00:08:14 +01:00
Fix:Merging chapters from multiple audio files with the same chapter titles #2461
This commit is contained in:
parent
d38058e1d2
commit
81a76593da
@ -468,7 +468,7 @@ class AudioFileScanner {
|
|||||||
audioFiles.length === 1 ||
|
audioFiles.length === 1 ||
|
||||||
audioFiles.length > 1 &&
|
audioFiles.length > 1 &&
|
||||||
audioFiles[0].chapters.length === audioFiles[1].chapters?.length &&
|
audioFiles[0].chapters.length === audioFiles[1].chapters?.length &&
|
||||||
audioFiles[0].chapters.every((c, i) => c.title === audioFiles[1].chapters[i].title)
|
audioFiles[0].chapters.every((c, i) => c.title === audioFiles[1].chapters[i].title && c.start === audioFiles[1].chapters[i].start)
|
||||||
) {
|
) {
|
||||||
libraryScan.addLog(LogLevel.DEBUG, `setChapters: Using embedded chapters in first audio file ${audioFiles[0].metadata?.path}`)
|
libraryScan.addLog(LogLevel.DEBUG, `setChapters: Using embedded chapters in first audio file ${audioFiles[0].metadata?.path}`)
|
||||||
chapters = audioFiles[0].chapters.map((c) => ({ ...c }))
|
chapters = audioFiles[0].chapters.map((c) => ({ ...c }))
|
||||||
|
Loading…
Reference in New Issue
Block a user