[Bug]: Series index inconsistant behaviour #334

Closed
opened 2026-04-24 23:05:11 +02:00 by adam · 3 comments
Owner

Originally created by @DDriggs00 on GitHub (May 4, 2022).

Describe the issue

In the series index field of an audiobook, 01 is different from 1.

Steps to reproduce the issue

  1. Take a pair of audiobooks that are a part of a series, and put them in your library under the format: John Smith/Series Name/01 - Book Title as suggested in the documentation
  2. Note that in the library, the series index of the books is listed as 01 and 02
  3. match one of the books (e.g. book 1) to a series using the full match function, replacing the series id.
  4. Note that in the library, book 1 is listed as 1 in the series, and book 2 is still listed as 02.

Audiobookshelf version

v2.0.9

How are you running audiobookshelf?

Docker

Originally created by @DDriggs00 on GitHub (May 4, 2022). ### Describe the issue In the series index field of an audiobook, `01` is different from `1`. ### Steps to reproduce the issue 1. Take a pair of audiobooks that are a part of a series, and put them in your library under the format: `John Smith/Series Name/01 - Book Title` as suggested in the documentation 2. Note that in the library, the series index of the books is listed as `01` and `02` 3. `match` one of the books (e.g. book 1) to a series using the full match function, replacing the series id. 4. Note that in the library, book 1 is listed as `1` in the series, and book 2 is still listed as `02`. ### Audiobookshelf version v2.0.9 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:05:11 +02:00
adam closed this issue 2026-04-24 23:05:12 +02:00
Author
Owner

@advplyr commented on GitHub (May 5, 2022):

Series sequence is stored as a string to cover all use-cases then uses natural numeric based sorting. This covers things like 1a, 1b or roman numerals.
We could attempt to convert to a number and if so it would strip the leading 0, but maybe someone wants their series shown as 001, 002, etc.

@advplyr commented on GitHub (May 5, 2022): Series sequence is stored as a string to cover all use-cases then uses natural numeric based sorting. This covers things like `1a`, `1b` or roman numerals. We could attempt to convert to a number and if so it would strip the leading 0, but maybe someone wants their series shown as `001`, `002`, etc.
Author
Owner

@DDriggs00 commented on GitHub (May 5, 2022):

I think that trimming leading zeroes would be sufficient to fix most problems, and cause very few other problems (e.g. 1b, etc.). While using 01 or 001 is useful in the case of sorting done by non-natural file systems, the metadata displayed in the web app does not have that issue, and using 1 is nearly universally accepted as standard.

@DDriggs00 commented on GitHub (May 5, 2022): I think that trimming leading zeroes would be sufficient to fix most problems, and cause very few other problems (e.g. `1b`, etc.). While using `01` or `001` is useful in the case of sorting done by non-natural file systems, the metadata displayed in the web app does not have that issue, and using `1` is nearly universally accepted as standard.
Author
Owner

@advplyr commented on GitHub (May 25, 2022):

Changed in v2.0.16

@advplyr commented on GitHub (May 25, 2022): Changed in [v2.0.16](https://github.com/advplyr/audiobookshelf/releases/tag/v2.0.16)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#334