[Bug]: Deleting book doesn't remove authors with no books #2388

Closed
opened 2026-04-25 00:06:41 +02:00 by adam · 2 comments
Owner

Originally created by @advplyr on GitHub (Dec 1, 2024).

What happened?

A book can be removed in the following ways:

  1. The library is removed (this works properly)
  2. A folder in the library is removed
  3. The "Remove library items with issues" endpoint that cleans up items marked as missing.
  4. Batch deleting multiple books
  5. Deleting a single book

What did you expect to happen?

If an author meets all of the following criteria it should be deleted:

  1. The author has no books
  2. The author does not have an ASIN set
  3. The author does not have a description
  4. The author does not have an image set

Criteria 2, 3 and 4 ensure that we don't remove an author that the user has added metadata for.
For example, the author may temporarily have no books because the user is working on their library and the user may have manually populated that metadata.

To accommodate users who still want to remove authors with no books that have metadata set we will add an option on the authors page to remove all authors with no books.

Steps to reproduce the issue

  1. Add a book with unique author
  2. Observe the author is added with no metadata
  3. Delete the book using any of method 2 through 5 outlined above.
  4. Observe the empty author remains

Audiobookshelf version

v2.17.3

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Windows

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

None

Logs

No response

Additional Notes

No response

Originally created by @advplyr on GitHub (Dec 1, 2024). ### What happened? A book can be removed in the following ways: 1. The library is removed (this works properly) 2. A folder in the library is removed 3. The "Remove library items with issues" endpoint that cleans up items marked as missing. 4. Batch deleting multiple books 5. Deleting a single book ### What did you expect to happen? If an author meets all of the following criteria it should be deleted: 1. The author has no books 2. The author does not have an ASIN set 3. The author does not have a description 4. The author does not have an image set Criteria 2, 3 and 4 ensure that we don't remove an author that the user has added metadata for. For example, the author may temporarily have no books because the user is working on their library and the user may have manually populated that metadata. To accommodate users who still want to remove authors with no books that have metadata set we will add an option on the authors page to remove all authors with no books. ### Steps to reproduce the issue 1. Add a book with unique author 2. Observe the author is added with no metadata 3. Delete the book using any of method 2 through 5 outlined above. 4. Observe the empty author remains ### Audiobookshelf version v2.17.3 ### How are you running audiobookshelf? Docker ### What OS is your Audiobookshelf server hosted from? Windows ### If the issue is being seen in the UI, what browsers are you seeing the problem on? None ### Logs _No response_ ### Additional Notes _No response_
adam added the bug label 2026-04-25 00:06:41 +02:00
adam closed this issue 2026-04-25 00:06:41 +02:00
Author
Owner

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

Authors with no books are also not removed when removing an author on the batch edit page.

@advplyr commented on GitHub (Dec 1, 2024): Authors with no books are also not removed when removing an author on the batch edit page.
Author
Owner

@github-actions[bot] commented on GitHub (Dec 6, 2024):

Fixed in v2.17.4.

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

No dependencies set.

Reference: starred/audiobookshelf#2388