[Bug]: Incorrect authors created from match results due to comma-separation #1764

Open
opened 2026-04-24 23:57:27 +02:00 by adam · 7 comments
Owner

Originally created by @mikiher on GitHub (Feb 25, 2024).

Describe the issue

Currently, when book match results are created, several authors are joined into a single author field with commas (e.g. "John Doe, Jane Doe"). Then when a match is selected (or when using quick match), the author field is again split into several authors, using comma separation.

Te current logic is problematic, since in many cases a single author name can include a comma (e.g. "John Doe, Ph.D."), and it is then split incorrectly into a number of authors (e.g. "Joen Doe" and "Ph.D"). A side-effect of this bahviour also caused #2650.

Proposed Solution:
Most match providers already return separate authors (I believe itunes is the only one returning a single author)
Instead of joining them into a single author field and then splitting it again, we should change the match results structure to contain an array of authors.

Steps to reproduce the issue

  1. Match a book where the match result author contains a comma (e.g. "John Doe, Ph.D.")
  2. Submit match result

Expected: Book has single author "John Doe, Ph.D."
Actual: Book has two authors, "John Doe", and "Ph.D."

Audiobookshelf version

v2.8.0

How are you running audiobookshelf?

Built from source

Originally created by @mikiher on GitHub (Feb 25, 2024). ### Describe the issue Currently, when book match results are created, several authors are joined into a single author field with commas (e.g. "John Doe, Jane Doe"). Then when a match is selected (or when using quick match), the author field is again split into several authors, using comma separation. Te current logic is problematic, since in many cases a single author name can include a comma (e.g. "John Doe, Ph.D."), and it is then split incorrectly into a number of authors (e.g. "Joen Doe" and "Ph.D"). A side-effect of this bahviour also caused #2650. **Proposed Solution:** Most match providers _already_ return separate authors (I believe itunes is the only one returning a single author) Instead of joining them into a single author field and then splitting it again, we should change the match results structure to contain an array of authors. ### Steps to reproduce the issue 1. Match a book where the match result author contains a comma (e.g. "John Doe, Ph.D.") 2. Submit match result Expected: Book has single author "John Doe, Ph.D." Actual: Book has two authors, "John Doe", and "Ph.D." ### Audiobookshelf version v2.8.0 ### How are you running audiobookshelf? Built from source
adam added the bug label 2026-04-24 23:57:27 +02:00
Author
Owner

@advplyr commented on GitHub (Dec 21, 2024):

I can't remember if this was fixed yet but I remember some work being done there at some point. I don't know of a book to test this with.

@advplyr commented on GitHub (Dec 21, 2024): I can't remember if this was fixed yet but I remember some work being done there at some point. I don't know of a book to test this with.
Author
Owner

@mikiher commented on GitHub (Dec 21, 2024):

This is not resolved.

For example, try matching Feeling Good by David Burns on Google Books.

@mikiher commented on GitHub (Dec 21, 2024): This is not resolved. For example, try matching **_Feeling Good_** by David Burns on Google Books.
Author
Owner

@damajor commented on GitHub (Feb 5, 2025):

This is really a pain and getting urgent to fix I think.

Audiobooks with multiples authors (same logic applies also to narrators) gets completly screwed when the list contains a single name author, even perfectly tagged audiobooks.

@advplyr You don't need specific audiobook to reproduce, just setup an author/narrator metadata with a list like this one "Fname1 Lname1, Fname2 Lname2, SingleName, Fname3 Lname3"
No matters where the single name author is, the fuzzy detection logic of ABS will screw up things.

I even tried with different authors separators and it does not help. I falsely assumed that some separators (';', '&') would help because I don't remember any author names with ';' or '&' in them, but not.

It happens when using metadata from audiobook files AND also when using PATH to discover authors.

Possible solutions:

The fuzzy discovering logic is great BUT it should never be mandatory.

  • Having a configuration flag to disable it per library can be a solution
  • Having a authors/narrators separator that automatically disable fuzzy discover is also a good idea

This issue is very similar to this one #1675

@damajor commented on GitHub (Feb 5, 2025): This is really a pain and getting urgent to fix I think. Audiobooks with multiples authors (same logic applies also to narrators) gets completly screwed when the list contains a single name author, even perfectly tagged audiobooks. @advplyr You don't need specific audiobook to reproduce, just setup an author/narrator metadata with a list like this one `"Fname1 Lname1, Fname2 Lname2, SingleName, Fname3 Lname3"` No matters where the single name author is, the fuzzy detection logic of ABS will screw up things. I even tried with different authors separators and it does not help. I falsely assumed that some separators (`';'`, `'&'`) would help because I don't remember any author names with `';'` or `'&'` in them, but not. It happens when using metadata from audiobook files AND also when using PATH to discover authors. _Possible solutions:_ The fuzzy discovering logic is great BUT it should never be mandatory. - Having a configuration flag to disable it per library can be a solution - Having a authors/narrators separator that automatically disable fuzzy discover is also a good idea This issue is very similar to this one #1675
Author
Owner

@advplyr commented on GitHub (Feb 5, 2025):

@damajor

I just tested this with the author names you mention in the folder structure and it pulled in correctly.

Image

To run this test I updated the scanner precedence moving folder structure to the top to ensure that the authors would be pulled from the folder name.

Image

I'm aware of author names like this John Doe, Ph.D being an issue but I'm not sure how to reproduce the single name author issue you are referring to.

Can you verify what version of Abs you are running and give more exact reproducible steps?

@advplyr commented on GitHub (Feb 5, 2025): @damajor I just tested this with the author names you mention in the folder structure and it pulled in correctly. ![Image](https://github.com/user-attachments/assets/c7e9f0c4-5f0f-455c-9538-a4430cb8544e) To run this test I updated the scanner precedence moving folder structure to the top to ensure that the authors would be pulled from the folder name. ![Image](https://github.com/user-attachments/assets/178b96bc-2450-4027-bac0-2ffe552b94f5) I'm aware of author names like this `John Doe, Ph.D` being an issue but I'm not sure how to reproduce the single name author issue you are referring to. Can you verify what version of Abs you are running and give more exact reproducible steps?
Author
Owner

@damajor commented on GitHub (Feb 5, 2025):

I just made a new test container (latest ABS) with the following audiobook tree:

Image

I used this library settings:

Image

Folder authors string is exactly the same inside the audiobook file.

And the results:

Image

Image

Image

Image

Well honestly I did not test with a single name author/narrator in middle of the list, but it seems that does not work if there is one in the first place of the author list. Maybe a side/edge effect ?

@damajor commented on GitHub (Feb 5, 2025): I just made a new test container (latest ABS) with the following audiobook tree: ![Image](https://github.com/user-attachments/assets/5f59d136-a803-4e70-82b7-b4354a7e34a5) I used this library settings: ![Image](https://github.com/user-attachments/assets/bece7e4c-11d1-4d22-97a4-0404dcfe6a4f) Folder authors string is exactly the same inside the audiobook file. And the results: ![Image](https://github.com/user-attachments/assets/fe3a0aa8-3857-4c04-9689-58d0ddc6efdc) ![Image](https://github.com/user-attachments/assets/ac398112-c956-4b08-b541-726864f574b4) ![Image](https://github.com/user-attachments/assets/b6047ada-fdbe-4b1d-8fdf-ba83d00ae1af) ![Image](https://github.com/user-attachments/assets/65b3b54a-6c05-4300-b513-9d612aaabec5) Well honestly I did not test with a single name author/narrator in middle of the list, but it seems that does not work if there is one in the first place of the author list. Maybe a side/edge effect ?
Author
Owner

@mikiher commented on GitHub (Feb 5, 2025):

In any case, the thing you're describing is not the same as the issue I described when I opened this bug. My issue specifically has to with matching (i.e. getting metadata from a match provider like Audible), not with metadata obtained through scanning. You should probably open a separate issue.

@mikiher commented on GitHub (Feb 5, 2025): In any case, the thing you're describing is not the same as the issue I described when I opened this bug. My issue specifically has to with matching (i.e. getting metadata from a match provider like Audible), not with metadata obtained through scanning. You should probably open a separate issue.
Author
Owner

@damajor commented on GitHub (Feb 5, 2025):

@mikiher & @advplyr I created this one (#3940) to track my issue.

@damajor commented on GitHub (Feb 5, 2025): @mikiher & @advplyr I created this one (#3940) to track my issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1764