[Enhancement]: Improve audiobook disc folder detection #2660

Open
opened 2026-04-25 00:09:22 +02:00 by adam · 0 comments
Owner

Originally created by @lgrn on GitHub (Mar 15, 2025).

Type of Enhancement

Server Backend

Describe the Feature/Enhancement

As per the docs the current "disc detection" states:

The title folder can contain subfolders for discs as long as they are named "Disc", "CD", or "Disk" with a number following (case insensitive). Example: "Disc 1", "CD 2", "Disk 3", "Disc 004", or no space between like "Disc1".

To avoid breaking changes, I propose something like adding a default-off toggle to make this detection more greedy, for example, instead of matching on, for example ^Dis[ck] \d+$, a greedy matching could be enabled for a library which instead looks for .*Dis[ck] \d+.*$.

This would resolve the issue where if an audiobook directory structure looks like this:

foo/
├── foo [Disc 1]
├── foo [Disc 2]
├── foo [Disc 3]

The sub-folders are not detected as "discs" of this book.

I'm logging this issue simply as a suggestion on how to improve auto-detection of existing disc folders. I am explicitly not looking for workarounds or solutions how to "fix" this issue.

Why would this be helpful?

If users have sourced an audiobook with a "non-standard" syntax, they should ideally not be forced into manual workarounds to get disc detection working, but instead may be given the option of "trying harder" to detect discs in that library.

Another option could be to force a library to understand a folder directory as always containing one book per folder, which would then parse all sub-files as part of that book.

Future Implementation (Screenshot)

Settings > Libraries > Edit > Settings

"Enable greedy disc regex matching", or "Assume every sub-folder is one book"

Audiobookshelf Server Version

v2.19.5

Current Implementation (Screenshot)

No response

Originally created by @lgrn on GitHub (Mar 15, 2025). ### Type of Enhancement Server Backend ### Describe the Feature/Enhancement As per [the docs](https://www.audiobookshelf.org/docs/#book-directory-structure) the current "disc detection" states: > The title folder can contain subfolders for discs as long as they are named "Disc", "CD", or "Disk" with a number following (case insensitive). Example: "Disc 1", "CD 2", "Disk 3", "Disc 004", or no space between like "Disc1". To avoid breaking changes, I propose something like adding a default-off toggle to make this detection more greedy, for example, instead of matching on, for example `^Dis[ck] \d+$`, a greedy matching could be enabled for a library which instead looks for `.*Dis[ck] \d+.*$`. This would resolve the issue where if an audiobook directory structure looks like this: ``` foo/ ├── foo [Disc 1] ├── foo [Disc 2] ├── foo [Disc 3] ``` The sub-folders are not detected as "discs" of this book. I'm logging this issue simply as a suggestion on how to improve auto-detection of existing disc folders. I am explicitly not looking for workarounds or solutions how to "fix" this issue. ### Why would this be helpful? If users have sourced an audiobook with a "non-standard" syntax, they should ideally not be forced into manual workarounds to get disc detection working, but instead may be given the option of "trying harder" to detect discs in that library. Another option could be to force a library to understand a folder directory as always containing one book per folder, which would then parse all sub-files as part of that book. ### Future Implementation (Screenshot) Settings > Libraries > Edit > Settings "Enable greedy disc regex matching", or "Assume every sub-folder is one book" ### Audiobookshelf Server Version v2.19.5 ### Current Implementation (Screenshot) _No response_
adam added the enhancement label 2026-04-25 00:09:22 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2660