[Bug]: Scanner does not automatically create chapters if "Audio file meta tags OR ebook metadata" is turned off #2483

Open
opened 2026-04-25 00:07:38 +02:00 by adam · 4 comments
Owner

Originally created by @sergebat on GitHub (Jan 13, 2025).

What happened?

I have disabled "Audio file meta tags OR ebook metadata" in the "Scanner" tab in the "Add Library" dialog. The scan completed fine, but none of my audiobooks (MP3 folder) had any chapters.

However, when I created a new Library with "Audio file meta tags OR ebook metadata" enabled, chapters were detected correctly. Chapter names were derived from file names and/or MP3 tags depending on the availability as expected.

This was slightly inconvinient, as MP3 tags on some of the books were not correctly UTF-encoded, and I had to mass-clean them up first.

What did you expect to happen?

I expected that "Audio file meta tags OR ebook metadata" is not a mandatory settings for chapter detection. I expected that chapters would be created by the scanner from the file names only if I have it disabled.

Steps to reproduce the issue

  1. Create a new Library.
  2. Select one folder for the audiobooks. \audiobooks\author1\book1\track1.mp3, ...
  3. Turn off the toggle for "Audio file meta tags OR ebook metadata". Keep the rest of the settings as is.
  4. Run scan.
  5. Navigate to an audiobook in a library view. No chapters will be available.

Audiobookshelf version

2.17.5

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Other (list in "Additional Notes" box)

If the issue is being seen in the UI, what browsers are you seeing the problem on?

None

Logs

{"id":"e32f4b21-71a1-4a81-b103-d34e4e6db6f2","type":"scan","library":{"id":"b40b60e2-ec83-4dc5-8f34-d93f1fe75940","name":"Test","displayOrder":2,"icon":"database","mediaType":"book","provider":"google","lastScan":"2025-01-13T05:51:57.132Z","lastScanVersion":"2.17.5","settings":{"coverAspectRatio":1,"disableWatcher":false,"autoScanCronExpression":null,"skipMatchingMediaWithAsin":false,"skipMatchingMediaWithIsbn":false,"audiobooksOnly":false,"epubsAllowScriptedContent":false,"hideSingleBookSeries":false,"onlyShowLaterBooksInContinueSeries":false,"metadataPrecedence":["folderStructure","nfoFile","txtFiles","opfFile","absMetadata"],"markAsFinishedPercentComplete":null,"markAsFinishedTimeRemaining":10},"extraData":{"lastScanMetadataPrecedence":["folderStructure","nfoFile","txtFiles","opfFile","absMetadata"]},"createdAt":"2025-01-13T05:46:57.347Z","updatedAt":"2025-01-13T05:51:57.132Z","libraryFolders":[{"id":"bc37b6cd-5f74-4db4-a9ee-a302e249012c","path":"/audiobooks/01 - Художественная литература","createdAt":"2025-01-13T05:46:57.476Z","updatedAt":"2025-01-13T05:46:57.476Z","libraryId":"b40b60e2-ec83-4dc5-8f34-d93f1fe75940"}]},"startedAt":1736747219765,"finishedAt":1736747517132,"elapsed":297367,"resultsAdded":171,"resultsUpdated":0,"resultsMissing":0}
{"timestamp":"2025-01-13T05:47:03.094Z","message":"171 item data found in folder \"/audiobooks/01 - Художественная литература\"","levelName":"INFO","level":2}
{"timestamp":"2025-01-13T05:47:05.051Z","message":"\"Жизнь пи\" Getting metadata with precedence [folderStructure, nfoFile, txtFiles, opfFile, absMetadata]","levelName":"DEBUG","level":1}
{"timestamp":"2025-01-13T05:47:05.871Z","message":"Success saving abmetadata to \"/metadata/items/52371736-74e2-46ef-bb84-c8d99273a853/metadata.json\"","levelName":"DEBUG","level":1}
{"timestamp":"2025-01-13T05:47:05.871Z","message":"Created new library item \"Янн Мартел/Жизнь пи\" with id \"52371736-74e2-46ef-bb84-c8d99273a853\"","levelName":"INFO","level":2}
{"timestamp":"2025-01-13T05:47:06.937Z","message":"\"Старик и море\" Getting metadata with precedence [folderStructure, nfoFile, txtFiles, opfFile, absMetadata]","levelName":"DEBUG","level":1}
{"timestamp":"2025-01-13T05:47:07.710Z","message":"Success saving abmetadata to \"/metadata/items/d9202e28-7b9d-4f57-b5bf-c56293c321c4/metadata.json\"","levelName":"DEBUG","level":1}
{"timestamp":"2025-01-13T05:47:07.710Z","message":"Created new library item \"Эрнест Хэмингуэй/Старик и море\" with id \"d9202e28-7b9d-4f57-b5bf-c56293c321c4\"","levelName":"INFO","level":2}
{"timestamp":"2025-01-13T05:47:11.265Z","message":"\"Черный обелиск\" Getting metadata with precedence [folderStructure, nfoFile, txtFiles, opfFile, absMetadata]","levelName":"DEBUG","level":1}
{"timestamp":"2025-01-13T05:47:12.104Z","message":"Success saving abmetadata to \"/metadata/items/c9a5e95b-a65b-4843-a228-6b3ab6464f28/metadata.json\"","levelName":"DEBUG","level":1}
{"timestamp":"2025-01-13T05:47:12.104Z","message":"Created new library item \"Эрих Мария Ремарк/Черный обелиск\" with id \"c9a5e95b-a65b-4843-a228-6b3ab6464f28\"","levelName":"INFO","level":2}

Additional Notes

Running in docker on Synology NAS.

Originally created by @sergebat on GitHub (Jan 13, 2025). ### What happened? I have disabled "Audio file meta tags OR ebook metadata" in the "Scanner" tab in the "Add Library" dialog. The scan completed fine, but none of my audiobooks (MP3 folder) had any chapters. However, when I created a new Library with "Audio file meta tags OR ebook metadata" enabled, chapters were detected correctly. Chapter names were derived from file names and/or MP3 tags depending on the availability as expected. This was slightly inconvinient, as MP3 tags on some of the books were not correctly UTF-encoded, and I had to mass-clean them up first. ### What did you expect to happen? I expected that "Audio file meta tags OR ebook metadata" is not a mandatory settings for chapter detection. I expected that chapters would be created by the scanner from the file names only if I have it disabled. ### Steps to reproduce the issue 1. Create a new Library. 2. Select one folder for the audiobooks. `\audiobooks\author1\book1\track1.mp3`, ... 3. Turn off the toggle for "Audio file meta tags OR ebook metadata". Keep the rest of the settings as is. 4. Run scan. 5. Navigate to an audiobook in a library view. No chapters will be available. ### Audiobookshelf version 2.17.5 ### How are you running audiobookshelf? Docker ### What OS is your Audiobookshelf server hosted from? Other (list in "Additional Notes" box) ### If the issue is being seen in the UI, what browsers are you seeing the problem on? None ### Logs ```shell {"id":"e32f4b21-71a1-4a81-b103-d34e4e6db6f2","type":"scan","library":{"id":"b40b60e2-ec83-4dc5-8f34-d93f1fe75940","name":"Test","displayOrder":2,"icon":"database","mediaType":"book","provider":"google","lastScan":"2025-01-13T05:51:57.132Z","lastScanVersion":"2.17.5","settings":{"coverAspectRatio":1,"disableWatcher":false,"autoScanCronExpression":null,"skipMatchingMediaWithAsin":false,"skipMatchingMediaWithIsbn":false,"audiobooksOnly":false,"epubsAllowScriptedContent":false,"hideSingleBookSeries":false,"onlyShowLaterBooksInContinueSeries":false,"metadataPrecedence":["folderStructure","nfoFile","txtFiles","opfFile","absMetadata"],"markAsFinishedPercentComplete":null,"markAsFinishedTimeRemaining":10},"extraData":{"lastScanMetadataPrecedence":["folderStructure","nfoFile","txtFiles","opfFile","absMetadata"]},"createdAt":"2025-01-13T05:46:57.347Z","updatedAt":"2025-01-13T05:51:57.132Z","libraryFolders":[{"id":"bc37b6cd-5f74-4db4-a9ee-a302e249012c","path":"/audiobooks/01 - Художественная литература","createdAt":"2025-01-13T05:46:57.476Z","updatedAt":"2025-01-13T05:46:57.476Z","libraryId":"b40b60e2-ec83-4dc5-8f34-d93f1fe75940"}]},"startedAt":1736747219765,"finishedAt":1736747517132,"elapsed":297367,"resultsAdded":171,"resultsUpdated":0,"resultsMissing":0} {"timestamp":"2025-01-13T05:47:03.094Z","message":"171 item data found in folder \"/audiobooks/01 - Художественная литература\"","levelName":"INFO","level":2} {"timestamp":"2025-01-13T05:47:05.051Z","message":"\"Жизнь пи\" Getting metadata with precedence [folderStructure, nfoFile, txtFiles, opfFile, absMetadata]","levelName":"DEBUG","level":1} {"timestamp":"2025-01-13T05:47:05.871Z","message":"Success saving abmetadata to \"/metadata/items/52371736-74e2-46ef-bb84-c8d99273a853/metadata.json\"","levelName":"DEBUG","level":1} {"timestamp":"2025-01-13T05:47:05.871Z","message":"Created new library item \"Янн Мартел/Жизнь пи\" with id \"52371736-74e2-46ef-bb84-c8d99273a853\"","levelName":"INFO","level":2} {"timestamp":"2025-01-13T05:47:06.937Z","message":"\"Старик и море\" Getting metadata with precedence [folderStructure, nfoFile, txtFiles, opfFile, absMetadata]","levelName":"DEBUG","level":1} {"timestamp":"2025-01-13T05:47:07.710Z","message":"Success saving abmetadata to \"/metadata/items/d9202e28-7b9d-4f57-b5bf-c56293c321c4/metadata.json\"","levelName":"DEBUG","level":1} {"timestamp":"2025-01-13T05:47:07.710Z","message":"Created new library item \"Эрнест Хэмингуэй/Старик и море\" with id \"d9202e28-7b9d-4f57-b5bf-c56293c321c4\"","levelName":"INFO","level":2} {"timestamp":"2025-01-13T05:47:11.265Z","message":"\"Черный обелиск\" Getting metadata with precedence [folderStructure, nfoFile, txtFiles, opfFile, absMetadata]","levelName":"DEBUG","level":1} {"timestamp":"2025-01-13T05:47:12.104Z","message":"Success saving abmetadata to \"/metadata/items/c9a5e95b-a65b-4843-a228-6b3ab6464f28/metadata.json\"","levelName":"DEBUG","level":1} {"timestamp":"2025-01-13T05:47:12.104Z","message":"Created new library item \"Эрих Мария Ремарк/Черный обелиск\" with id \"c9a5e95b-a65b-4843-a228-6b3ab6464f28\"","levelName":"INFO","level":2} ``` ### Additional Notes Running in docker on Synology NAS.
adam added the bug label 2026-04-25 00:07:38 +02:00
Author
Owner

@sergebat commented on GitHub (Jan 13, 2025):

I'd like to add that I could not find any description of this behavior in the guides https://www.audiobookshelf.org/guides/book-scanner . For quite some time I was even under impression that "no automatic chapters" is an audiobookshelf limitation!

In retrospect I think it makes sense the scanner MIGHT need access to media tags for chapter creation to avoid unneeded complexity. If this is the case, it is probably good to document it somewhere.

@sergebat commented on GitHub (Jan 13, 2025): I'd like to add that I could not find any description of this behavior in the guides https://www.audiobookshelf.org/guides/book-scanner . For quite some time I was even under impression that "no automatic chapters" is an audiobookshelf limitation! In retrospect I think it makes sense the scanner MIGHT need access to media tags for chapter creation to avoid unneeded complexity. If this is the case, it is probably good to document it somewhere.
Author
Owner

@nichwall commented on GitHub (Jan 13, 2025):

How would you describe it more clearly? When chapters are embedded in the file metadata, that is a metadata tag for the media files.

Edit to add: I'm asking so we can update the docs, because to me it is clear as written.

@nichwall commented on GitHub (Jan 13, 2025): How would you describe it more clearly? When chapters are embedded in the file metadata, that is a metadata tag for the media files. Edit to add: I'm asking so we can update the docs, because to me it is clear as written.
Author
Owner

@sergebat commented on GitHub (Jan 13, 2025):

@nichwall let's make sure we are talking about the same thing first.

Let me pick a specific example:

  1. I have an audiobook in my collection /audiobooks/author/book/01_00.mp3, 01_01.mp3, etc.
  2. This book does NOT have a title populated in the MP3 tags. See screenshot.

My expectation was that "Audio file meta tags OR ebook metadata" flag controls if Audiobookshelf pulls data from the file meta tags (like MP3 "title" tag). Thus my expectation was that for such a book this setting has no effect.

However, the actual behavior is:

  • With "Audio file meta tags OR ebook metadata" disabled, the book has no chapters after scan.
  • With "Audio file meta tags OR ebook metadata" enabled, the book HAS chapters created after scan. Chapter names are file names. Just what I expect.

If this is intentional I expect something like that in the documentation:
_Note that chapters will NOT be automatically created on scan for MP3 audiobooks unless you turn on "Audio file meta tags OR ebook metadata". You need to turn it on even if you don't have MP3 tags populated and want the tracks created from the file names. Here's why.... _

image

So if scanner

@sergebat commented on GitHub (Jan 13, 2025): @nichwall let's make sure we are talking about the same thing first. Let me pick a specific example: 1. I have an audiobook in my collection /audiobooks/author/book/01_00.mp3, 01_01.mp3, etc. 2. This book does NOT have a title populated in the MP3 tags. See screenshot. My expectation was that "Audio file meta tags OR ebook metadata" flag controls if Audiobookshelf pulls data from the file meta tags (like MP3 "title" tag). Thus my expectation was that for such a book this setting has no effect. However, the actual behavior is: - With "Audio file meta tags OR ebook metadata" disabled, the book has no chapters after scan. - With "Audio file meta tags OR ebook metadata" enabled, the book HAS chapters created after scan. Chapter names are file names. Just what I expect. If this is intentional I expect something like that in the documentation: _Note that chapters will NOT be automatically created on scan for MP3 audiobooks unless you turn on "Audio file meta tags OR ebook metadata". You need to turn it on even if you don't have MP3 tags populated and want the tracks created from the file names. Here's why.... _ ![image](https://github.com/user-attachments/assets/cd0c7e0e-2d20-46d1-b9a5-b214fac74ca1) So if scanner
Author
Owner

@advplyr commented on GitHub (Jan 13, 2025):

I would consider that a bug. The logic for setting book chapters is in the audio file metatags scanner which is skipped if that is disabled.
We should have logic that sets the chapters using the audio file names for multi-track audiobooks if the audio file metatags scanner is disabled.

@advplyr commented on GitHub (Jan 13, 2025): I would consider that a bug. The logic for setting book chapters is in the audio file metatags scanner which is skipped if that is disabled. We should have logic that sets the chapters using the audio file names for multi-track audiobooks if the audio file metatags scanner is disabled.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2483