mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-02 22:46:56 -05:00
[Bug]: Strip leading and trailing zeros from series number in metadata scanner #3269
Labels
No labels
authentication
awaiting release
backlog
bug
chapter editor
config-issue
ebooks
encoding/embedding
enhancement
help wanted
listening sessions & progress
planned
possible plugin
progress sync
sorting/filtering/searching
unable to reproduce
upload
users & permissions
waiting
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/audiobookshelf#3269
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @saltedlolly on GitHub (Nov 12, 2025).
What happened?
I am noticing some inconsistency with the way series numbers are displayed. For numbers under 10, sometimes they have a leading zero and sometimes they don't:
I think this comes from an inconistency with how they are written in the folder name or meta tags. Sometime they may have leading zero, and sometimes not:
00.5
0.5
01.5
1.5
It can also be because people want folder names to sort alphabetically for a book series, especially if there are more than 10 books:
e.g. ...
/Author Name/Series Name/Vol 08.0 - Book Title
/Author Name/Series Name/Vol 08.5 - Book Title (Novella)
/Author Name/Series Name/Vol 09.0 - Book Title
/Author Name/Series Name/Vol 10.0 - Book Title
/Author Name/Series Name/Vol 11.0 - Book Title
/Author Name/Series Name/Vol 11.5 - Book Title (Novella)
etc.
I am not sure whether this is happening in the backend server, or in the web ui.
What did you expect to happen?
The metadata scanner should strip any leading or trailing zeros from the series number as files are scanned. So the above would be converted to this:
#8 - Book Title
#8.5 - Book Title (Novella)
#9 - Book Title
#10 - Book Title
#11 - Book Title
#11.5 - Book Title (Novella)
Obviously, numbers under 1 would still have leading zero, and #0 is also allowed. These are all permitted:
#0
#0.5
#0.05
#0.6
#1
#1.5
#10
#11.5
etc.
Steps to reproduce the issue
1Import some media with following folder names:
/Vol 05.5 - Book Title
/Vol 6.5 - Book Title
Audiobookshelf version
2.30.0
How are you running audiobookshelf?
Windows Tray App
What OS is your Audiobookshelf server hosted from?
Windows
If the issue is being seen in the UI, what browsers are you seeing the problem on?
Other (list in "Additional Notes" box)
Logs
Additional Notes
Using Arc Browser on macOS