[Bug]: Incorrect books identification and count after merging authors #2973

Closed
opened 2026-04-25 00:12:34 +02:00 by adam · 1 comment
Owner

Originally created by @Phantomwise on GitHub (Aug 27, 2025).

What happened?

There are kinda 2 issues, one with merging authors, and a related issue with deleting books from merged authors.

  • In an old librrary, I had books from the same author for which one book used a different way to write the author's name than the other books ("Daphne Du Maurier" instead of "Daphne du Maurier", "S.A. Chakraborty" instead of "Shannon Chakraborty") in the embedded metadata
  • On the "Authors" page, I had two entries for those authors.
  • On the "Authors" page, I renamed the odd author entry into the same name than the other books used, so it was merged (renamed "Daphne Du Maurier" into "Daphne du Maurier", and "S.A. Chakraborty" into "Shannon Chakraborty").
  • I didn't check if after the merge the remaining author listed all the books (tested later, it doesn't, see Additional Notes)
  • Today I deleted the books in question (full delete, files included)
  • The author page of those authors doesn't show any books, since they've been deleted:
Image Image
  • But in the "Authors" view, the entry for those authors still displays "1 Books":
Image
  • I re-downloaded those books and added them to my new library
  • Same issue with the author names
  • I think I merged the authors (not certain so I did another test later, in case I misremember and had actually edited the author field manually for one instead, see Additional Notes)
  • The remaining "Daphne du Maurier" author doesn't list the books from the other variation, but "Shannon Chakraborty" does.

What did you expect to happen?

  • When merging authors, the remaining author's page and book count includes books of the entry that was deleted during the merge
  • The number of books by an author is the same whether it's in the author's page or in the general "Authors" view.
  • Deleted books don't get counted

Steps to reproduce the issue

  1. Add two books with different authors
  2. Go to the "Authors" view
  3. Rename one of the authors into the exact name of the second author
  4. Rescan manually if you want, it doesn't change anything
  5. Check the entry for the remaining author in the "Authors" view

Audiobookshelf version

v2.29.0

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Linux

If the issue is being seen in the UI, what browsers are you seeing the problem on?

Firefox

Logs


Additional Notes

In the deletion case, I checked the actual files, they were deleted correctly, there aren't any remaining books by those authors in my library.

I tried to replicate the merge issue in a new test library:

  • I copied two books, one with "Daphne du Maurier" as author and one with "Daphne Du Maurier" in the embedded metadata. I copied them outside the library and deleted the metadata file from the folders, leaving only the audio file, cue file and cover.
  • I created a new library
  • I added the two books
  • I didn't match the books
  • The "Authors" view showed two authors with 1 book each (correct)
Image
  • I matched the authors
  • I merged "Daphne Du Maurier" into "Daphne du Maurier"
Image
  • And now I only have one author with one book (not correct)
Image Image
  • ... even though both books now have "Daphne du Maurier" as author :
Image Image
  • There's only one author listed in the "Author" filter on the library view, but it also only shows one book:
Image

Same with Shannon Chakraborty

  • Before the merge:
Image
  • After the merge:
Image

Workaround:

  • Manually remove the author's name from the author field
  • Save
  • Manually add the author's name back to the author field
  • Save
  • Fixed, now the author's page displays all books.
Originally created by @Phantomwise on GitHub (Aug 27, 2025). ### What happened? There are kinda 2 issues, one with merging authors, and a related issue with deleting books from merged authors. - In an old librrary, I had books from the same author for which one book used a different way to write the author's name than the other books ("Daphne Du Maurier" instead of "Daphne du Maurier", "S.A. Chakraborty" instead of "Shannon Chakraborty") in the embedded metadata - On the "Authors" page, I had two entries for those authors. - On the "Authors" page, I renamed the odd author entry into the same name than the other books used, so it was merged (renamed "Daphne Du Maurier" into "Daphne du Maurier", and "S.A. Chakraborty" into "Shannon Chakraborty"). - I didn't check if after the merge the remaining author listed all the books (tested later, it doesn't, see Additional Notes) - Today I deleted the books in question (full delete, files included) - The author page of those authors doesn't show any books, since they've been deleted: <img width="642" height="542" alt="Image" src="https://github.com/user-attachments/assets/700726c9-afee-4fa8-8168-8e1f56caeaf5" /> <img width="660" height="539" alt="Image" src="https://github.com/user-attachments/assets/193c5bae-3d4c-436d-a778-ef32e1d28531" /> - But in the "Authors" view, the entry for those authors still displays "1 Books": <img width="1366" height="768" alt="Image" src="https://github.com/user-attachments/assets/2a0c8e51-18af-4211-aec6-ea82926cdfbf" /> - I re-downloaded those books and added them to my new library - Same issue with the author names - I think I merged the authors (not certain so I did another test later, in case I misremember and had actually edited the author field manually for one instead, see Additional Notes) - The remaining "Daphne du Maurier" author doesn't list the books from the other variation, but "Shannon Chakraborty" does. ### What did you expect to happen? - When merging authors, the remaining author's page and book count includes books of the entry that was deleted during the merge - The number of books by an author is the same whether it's in the author's page or in the general "Authors" view. - Deleted books don't get counted ### Steps to reproduce the issue 1. Add two books with different authors 2. Go to the "Authors" view 3. Rename one of the authors into the exact name of the second author 4. Rescan manually if you want, it doesn't change anything 5. Check the entry for the remaining author in the "Authors" view ### Audiobookshelf version v2.29.0 ### How are you running audiobookshelf? Docker ### What OS is your Audiobookshelf server hosted from? Linux ### If the issue is being seen in the UI, what browsers are you seeing the problem on? Firefox ### Logs ```shell ``` ### Additional Notes In the deletion case, I checked the actual files, they were deleted correctly, there aren't any remaining books by those authors in my library. I tried to replicate the merge issue in a new test library: - I copied two books, one with "Daphne du Maurier" as author and one with "Daphne Du Maurier" in the embedded metadata. I copied them outside the library and deleted the metadata file from the folders, leaving only the audio file, cue file and cover. - I created a new library - I added the two books - I didn't match the books - The "Authors" view showed two authors with 1 book each (correct) <img width="1366" height="463" alt="Image" src="https://github.com/user-attachments/assets/297ca576-8395-433e-a0d3-9eddb0f7a1ef" /> - I matched the authors - I merged "Daphne Du Maurier" into "Daphne du Maurier" <img width="1366" height="462" alt="Image" src="https://github.com/user-attachments/assets/fe8a568c-6524-470d-b1d9-b29be8b068be" /> - And now I only have one author with one book (not correct) <img width="1366" height="461" alt="Image" src="https://github.com/user-attachments/assets/f6917489-4d5e-45cb-af83-8d47104fb09c" /> <img width="1366" height="768" alt="Image" src="https://github.com/user-attachments/assets/16058464-6169-405f-a248-a1317738182a" /> - ... even though both books now have "Daphne du Maurier" as author : <img width="1366" height="768" alt="Image" src="https://github.com/user-attachments/assets/41e05c42-5f6a-4d87-93aa-45a383555bfe" /> <img width="1366" height="768" alt="Image" src="https://github.com/user-attachments/assets/f7b5e7df-6aa1-4f1e-9ddf-f003a8a3a858" /> - There's only one author listed in the "Author" filter on the library view, but it also only shows one book: <img width="1366" height="268" alt="Image" src="https://github.com/user-attachments/assets/f14e6ede-b900-406a-bd57-b5c60de378aa" /> Same with Shannon Chakraborty - Before the merge: <img width="495" height="266" alt="Image" src="https://github.com/user-attachments/assets/64e5ec38-6f9f-4d92-8efd-0461342cc51a" /> - After the merge: <img width="1366" height="265" alt="Image" src="https://github.com/user-attachments/assets/3018d626-8103-4f3b-8bec-489d3275c12e" /> Workaround: - Manually remove the author's name from the author field - Save - Manually add the author's name back to the author field - Save - Fixed, now the author's page displays all books.
adam added the bug label 2026-04-25 00:12:34 +02:00
adam closed this issue 2026-04-25 00:12:35 +02:00
Author
Owner

@github-actions[bot] commented on GitHub (Mar 12, 2026):

Fixed in v2.33.0.

@github-actions[bot] commented on GitHub (Mar 12, 2026): Fixed in [v2.33.0](https://github.com/advplyr/audiobookshelf/releases/tag/v2.33.0).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2973