[Bug] Series volume sorting with dot #146

Closed
opened 2026-04-24 22:59:29 +02:00 by adam · 5 comments
Owner

Originally created by @mx03 on GitHub (Dec 25, 2021).

For some series that are splitted up in multiple seasons or books i abuse the series-part with following pattern: seriesnumber.volumenumber (eg: 1.1 , 1.2 , 2.3).

The series is currently sorted: ( 1.10 , 1.1, 1.2, [...] 1.9, 2.10, 2.1 [...] ), better would be the natural sorting. ( 1.1 1.2 [...] 1.9 1.10 2.1 )

Not sure if the volume numbering overall wanted to be other than pure number or if its ok with dot.

Originally created by @mx03 on GitHub (Dec 25, 2021). For some series that are splitted up in multiple seasons or books i abuse the series-part with following pattern: _seriesnumber_._volumenumber_ (eg: 1.1 , 1.2 , 2.3). The series is currently sorted: ( 1.10 , 1.1, 1.2, [...] 1.9, 2.10, 2.1 [...] ), better would be the natural sorting. ( 1.1 1.2 [...] 1.9 1.10 2.1 ) Not sure if the volume numbering overall wanted to be other than pure number or if its ok with dot.
adam added the bug label 2026-04-24 22:59:29 +02:00
adam closed this issue 2026-04-24 22:59:30 +02:00
Author
Owner

@advplyr commented on GitHub (Dec 25, 2021):

This is a bug then, as long as it is a valid number it should be sorted as that.

@advplyr commented on GitHub (Dec 25, 2021): This is a bug then, as long as it is a valid number it should be sorted as that.
Author
Owner

@mx03 commented on GitHub (Dec 25, 2021):

The problem is ab.book.volumeNumber is a string, if you use Number the result is:

Number('1.1') // => 1.1
Number('1.10') // => 1.1

If it should works with this logic it shouldn't treated as Number and use https://www.npmjs.com/package/fast-sort#natural-sorting--language-sensitive-sorting instead

@mx03 commented on GitHub (Dec 25, 2021): The problem is ab.book.volumeNumber is a string, if you use Number the result is: ```js Number('1.1') // => 1.1 Number('1.10') // => 1.1 ``` If it should works with this logic it shouldn't treated as Number and use https://www.npmjs.com/package/fast-sort#natural-sorting--language-sensitive-sorting instead
Author
Owner

@advplyr commented on GitHub (Dec 26, 2021):

I wasn't aware of language sensitive sorting, thanks for finding that.
This is included in v1.6.48

@advplyr commented on GitHub (Dec 26, 2021): I wasn't aware of language sensitive sorting, thanks for finding that. This is included in `v1.6.48`
Author
Owner

@mx03 commented on GitHub (Dec 26, 2021):

regression after changing series route https://github.com/advplyr/audiobookshelf/commit/6b9ce453b9c0f1bafff24c254c6d967c628d1588

@mx03 commented on GitHub (Dec 26, 2021): regression after changing series route https://github.com/advplyr/audiobookshelf/commit/6b9ce453b9c0f1bafff24c254c6d967c628d1588
Author
Owner

@advplyr commented on GitHub (Dec 27, 2021):

I just pushed a patch for this, same version.

@advplyr commented on GitHub (Dec 27, 2021): I just pushed a patch for this, same version.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#146