Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Series volume sorting with dot #261

Closed
mx03 opened this issue Dec 25, 2021 · 5 comments
Closed

[Bug] Series volume sorting with dot #261

mx03 opened this issue Dec 25, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@mx03
Copy link
Contributor

mx03 commented 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.

@advplyr
Copy link
Owner

advplyr commented Dec 25, 2021

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

@advplyr advplyr added the bug Something isn't working label Dec 25, 2021
@mx03 mx03 changed the title [Enhancement] Series volume sorting with dot [Bug] Series volume sorting with dot Dec 25, 2021
@mx03
Copy link
Contributor Author

mx03 commented 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

@advplyr
Copy link
Owner

advplyr commented Dec 26, 2021

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

@advplyr advplyr closed this as completed Dec 26, 2021
@mx03
Copy link
Contributor Author

mx03 commented Dec 26, 2021

regression after changing series route 6b9ce45

@advplyr
Copy link
Owner

advplyr commented Dec 27, 2021

I just pushed a patch for this, same version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants