[Bug]: Folders missed during initial scan #3172

Open
opened 2026-04-25 00:14:04 +02:00 by adam · 2 comments
Owner

Originally created by @Jimmni on GitHub (Jan 4, 2026).

What happened?

Adding a library of ~10k audiobooks, only ~9k were scanned. I wrote a quick script to compare the contents of the ABS library to my folder of books, and found all cultprits had two or more series in their folder structure. e.g.

Audiobooks/Author/Warhammer/Warhammer 40,000/Book/Book.m4b

Testing the exact same files in a test library of only that author, all books scanned just fine on the first scan.

Renaming the Author folder of any of the missing books to Author_temp triggers ABS to pick up the contents of the folder. It remains happy after Author_temp is renamed back to Author, updating the paths.

This appears to only be an issue on the initial library scan, though I can't confirm that for sure. Any files removed and readded (or just renamed author folder) get scanned correctly.

What did you expect to happen?

I expected it to scan all the files.

Steps to reproduce the issue

  1. Have a large library. Cannot speculate on how large it needs to be.
  2. Have folders in the library with the structure Author/Series 1/Series 2/Book/Book.m4b
  3. Create a new library.
  4. Wait for library to scan.
  5. Despair.

Audiobookshelf version

2.32.1

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

macOS

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

None

Logs

The missed books do not appear in the logs at all. Searching the logs for a book that isn't indexed yields zero results.

Additional Notes

I fixed the issue by renaming missing authors to AUTHOR_temp, letting a new automatic scan pick it up, then renaming it back to AUTHOR and letting a new scan update the paths. It was tedious but worked.

Originally created by @Jimmni on GitHub (Jan 4, 2026). ### What happened? Adding a library of ~10k audiobooks, only ~9k were scanned. I wrote a quick script to compare the contents of the ABS library to my folder of books, and found all cultprits had two or more series in their folder structure. e.g. Audiobooks/Author/Warhammer/Warhammer 40,000/Book/Book.m4b Testing the exact same files in a test library of only that author, all books scanned just fine on the first scan. Renaming the Author folder of any of the missing books to Author_temp triggers ABS to pick up the contents of the folder. It remains happy after Author_temp is renamed back to Author, updating the paths. This appears to only be an issue on the initial library scan, though I can't confirm that for sure. Any files removed and readded (or just renamed author folder) get scanned correctly. ### What did you expect to happen? I expected it to scan all the files. ### Steps to reproduce the issue 1. Have a large library. Cannot speculate on how large it needs to be. 2. Have folders in the library with the structure Author/Series 1/Series 2/Book/Book.m4b 3. Create a new library. 4. Wait for library to scan. 5. Despair. ### Audiobookshelf version 2.32.1 ### How are you running audiobookshelf? Docker ### What OS is your Audiobookshelf server hosted from? macOS ### If the issue is being seen in the UI, what browsers are you seeing the problem on? None ### Logs ```shell The missed books do not appear in the logs at all. Searching the logs for a book that isn't indexed yields zero results. ``` ### Additional Notes I fixed the issue by renaming missing authors to AUTHOR_temp, letting a new automatic scan pick it up, then renaming it back to AUTHOR and letting a new scan update the paths. It was tedious but worked.
adam added the bug label 2026-04-25 00:14:04 +02:00
Author
Owner

@Jimmni commented on GitHub (Jan 4, 2026):

Will add that after carefully checking there are still some that it just won't pick up unless I move them to a lower folder. Weirdly, SOME in the folders will be picked up, but others are ignored.

e.g.

Author/Series 1/Series 2/Book 1/Book 1.m4b <-- Ignored
Author/Series 1/Series 2/Book 2/Book 2.m4b <-- Indexed

Yet to discover what it isn't liking about the ones it's ignoring.

Okay for the ones that weren't fixed by triggering an automatic scan on their folders the problem was something different - it was ones where the path as something like:

Author/Book Series/Book Series/Book/Book.m4b

Changing it to

Author/Book Series Universe/Book Series/Book.m4b

seems to fix that. That one's definitely on me. The main "initial scan doesn't pick up deeper nested folders" remains an issue though.

@Jimmni commented on GitHub (Jan 4, 2026): Will add that after carefully checking there are still some that it just won't pick up unless I move them to a lower folder. Weirdly, SOME in the folders will be picked up, but others are ignored. e.g. Author/Series 1/Series 2/Book 1/Book 1.m4b <-- Ignored Author/Series 1/Series 2/Book 2/Book 2.m4b <-- Indexed ~~Yet to discover what it isn't liking about the ones it's ignoring.~~ Okay for the ones that weren't fixed by triggering an automatic scan on their folders the problem was something different - it was ones where the path as something like: Author/Book Series/Book Series/Book/Book.m4b Changing it to Author/Book Series Universe/Book Series/Book.m4b seems to fix that. That one's definitely on me. The main "initial scan doesn't pick up deeper nested folders" remains an issue though.
Author
Owner

@Jimmni commented on GitHub (Jan 5, 2026):

Also happens with some folders on update scans. I added a folder with Author > Series Universe > Series > Book > Book.m4b and of the 12 books in the Series folder, 3 got added. I also found that when I moved the folder back out and then back in again, some other books in my library, completely unrelated, got assigned the missing books? Only the file metadata is being used on scan. (The Dakota Krout books are the ones I was moving in and out. I have no idea how Emminence in Shadow got involved.)

Image
@Jimmni commented on GitHub (Jan 5, 2026): Also happens with some folders on update scans. I added a folder with Author > Series Universe > Series > Book > Book.m4b and of the 12 books in the Series folder, 3 got added. I also found that when I moved the folder back out and then back in again, some other books in my library, completely unrelated, got assigned the missing books? Only the file metadata is being used on scan. (The Dakota Krout books are the ones I was moving in and out. I have no idea how Emminence in Shadow got involved.) <img width="1162" height="834" alt="Image" src="https://github.com/user-attachments/assets/84bb648a-8e19-459c-baf1-86df8cc5e234" />
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3172