Alphabetization seems to be broken #8

Closed
opened 2026-02-20 09:37:41 -05:00 by deekerman · 2 comments
Owner

Originally created by @Merijeek on GitHub (Aug 26, 2021).

It's possible one of the problems you're seeing here is that the Peter F. Hamilton books have a middle initial.

Title seems good:

image

Last, First:

Pretty random:

image

First, Last:

Doesn't change from the previous:

image

All of the authors are all consistent - all the Robert Jordan are the same text, all the Peter F. Hamilton are the same text, etc. But as you can see, they're sprinkled randomly. Duration and size I haven't actually checked that thoroughly, but they SEEM good.

Originally created by @Merijeek on GitHub (Aug 26, 2021). It's possible one of the problems you're seeing here is that the Peter F. Hamilton books have a middle initial. Title seems good: ![image](https://user-images.githubusercontent.com/65377425/131052974-1c14e6ca-1c5a-4f7e-b116-b45becae03bc.png) Last, First: Pretty random: ![image](https://user-images.githubusercontent.com/65377425/131053021-f1fe3194-94cd-4034-a0c7-4966c2acaeea.png) First, Last: Doesn't change from the previous: ![image](https://user-images.githubusercontent.com/65377425/131053086-c2ff9fc8-8900-427e-9d05-9254671972c2.png) All of the authors are all consistent - all the Robert Jordan are the same text, all the Peter F. Hamilton are the same text, etc. But as you can see, they're sprinkled randomly. Duration and size I haven't actually checked that thoroughly, but they SEEM good.
Author
Owner

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

When I added support for alphabetization by last name, I had to add 2 additional variables to Book's.
authorFL (FL = First/Last)
and authorLF

Anytime the author changes, or when it is seen for the first time on a scan, those 2 variables get calculated by passing the author into this function.

My guess is, those variables never got set since your books were added before that update was made. You can check if those variables got set by hovering over the author name on the audiobook landing page.

image

You can also test that it fixes itself by changing the author name, saving, then changing it back and saving. That should update the authorFL and authorLF vars. The batch editor will make this an easy task now

@advplyr commented on GitHub (Aug 27, 2021): When I added support for alphabetization by last name, I had to add 2 additional variables to Book's. `authorFL` (FL = First/Last) and `authorLF` Anytime the author changes, or when it is seen for the first time on a scan, those 2 variables get calculated by passing the author into [this](https://github.com/advplyr/audiobookshelf/blob/master/server/utils/parseAuthors.js) function. My guess is, those variables never got set since your books were added before that update was made. You can check if those variables got set by hovering over the author name on the audiobook landing page. ![image](https://user-images.githubusercontent.com/67830747/131115117-11a9bb83-f8e9-47e4-a413-ed7800031b3c.png) You can also test that it fixes itself by changing the author name, saving, then changing it back and saving. That should update the `authorFL` and `authorLF` vars. The batch editor will make this an easy task now
Author
Owner

@Merijeek commented on GitHub (Aug 27, 2021):

Yup. You were completely correct. Nice job!

@Merijeek commented on GitHub (Aug 27, 2021): Yup. You were completely correct. Nice job!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/audiobookshelf-advplyr#8
No description provided.