mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-02-19 00:18:56 +01:00
Logs correctly and simplifies for single audio file.
This commit is contained in:
parent
72d0b097ab
commit
5d96b2cc6e
@ -424,8 +424,9 @@ class Book {
|
|||||||
if (includedAudioFiles[0].chapters?.length) {
|
if (includedAudioFiles[0].chapters?.length) {
|
||||||
// If all files chapters are the same, then only make chapters for the first file
|
// If all files chapters are the same, then only make chapters for the first file
|
||||||
if (
|
if (
|
||||||
|
includedAudioFiles.length === 1 ||
|
||||||
includedAudioFiles.length > 1 &&
|
includedAudioFiles.length > 1 &&
|
||||||
includedAudioFiles[0].chapters.length === includedAudioFiles[1].chapters.length &&
|
includedAudioFiles[0].chapters.length === includedAudioFiles[1].chapters?.length &&
|
||||||
includedAudioFiles[0].chapters.every((c, i) => c.title === includedAudioFiles[1].chapters[i].title)
|
includedAudioFiles[0].chapters.every((c, i) => c.title === includedAudioFiles[1].chapters[i].title)
|
||||||
) {
|
) {
|
||||||
Logger.debug(`[Book] setChapters: Using embedded chapters in first audio file ${includedAudioFiles[0].metadata?.path}`)
|
Logger.debug(`[Book] setChapters: Using embedded chapters in first audio file ${includedAudioFiles[0].metadata?.path}`)
|
||||||
|
Loading…
Reference in New Issue
Block a user