Fix:Merging chapters from multiple audio files with the same chapter titles #2461

This commit is contained in:
advplyr 2023-12-31 15:35:17 -06:00
parent d38058e1d2
commit 81a76593da

View File

@ -468,7 +468,7 @@ class AudioFileScanner {
audioFiles.length === 1 ||
audioFiles.length > 1 &&
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}`)
chapters = audioFiles[0].chapters.map((c) => ({ ...c }))