[Enhancement]:Authors With 0 Books - Automatic Cleanup #1625

Open
opened 2026-04-24 23:52:26 +02:00 by adam · 9 comments
Owner

Originally created by @StarOverSky on GitHub (Dec 29, 2023).

Describe the feature/enhancement

Please allow the automatic removal of authors with 0 books. I have many authors with 0 books across multiple libraries. The only way to remove them is manually. This is a tedious process that can be automated by ABS.
Screenshot 2023-12-29 at 12 06 54 PM

Originally created by @StarOverSky on GitHub (Dec 29, 2023). ### Describe the feature/enhancement Please allow the automatic removal of authors with 0 books. I have many authors with 0 books across multiple libraries. The only way to remove them is manually. This is a tedious process that can be automated by ABS. <img width="373" alt="Screenshot 2023-12-29 at 12 06 54 PM" src="https://github.com/advplyr/audiobookshelf/assets/2897699/1e8e2c61-4cb6-4307-8553-3882ec098113">
adam added the enhancement label 2026-04-24 23:52:26 +02:00
Author
Owner

@methosinhiding commented on GitHub (Jan 23, 2024):

Copying this content in from #2547 which is a semi-duplicate (I don't think auto-pruning unused authors should be the default given the level of curation some folks put into their author profile information, however maybe a toggleable option would make sense)

The authors view is currently sorted by Author name by default, but there are no other sorting/filtering options.

Since the addition of authors is automatic but removals are a manual action, a common interaction with the authors page is to use the browser search functionality to locate and then manually delete authors who have 0 books attributed to them (either because their name was wrong/corrected, the 'author' was multiple merged names that had since been split out, or because the file was removed/moved to a different library, etc)

It would be very useful for this repeated author removal task to either be able to sort the author list by book count so that 0-book authors could be deleted en-masse or to provide a shortcut to perform that specific action such as a 'Purge Authors who have no books' button

@methosinhiding commented on GitHub (Jan 23, 2024): Copying this content in from #2547 which is a semi-duplicate (I don't think auto-pruning unused authors should be the default given the level of curation some folks put into their author profile information, however maybe a toggleable option would make sense) ------------- The authors view is currently sorted by Author name by default, but there are no other sorting/filtering options. Since the addition of authors is automatic but removals are a manual action, a common interaction with the authors page is to use the browser search functionality to locate and then manually delete authors who have 0 books attributed to them (either because their name was wrong/corrected, the 'author' was multiple merged names that had since been split out, or because the file was removed/moved to a different library, etc) It would be very useful for this repeated author removal task to either be able to sort the author list by book count so that 0-book authors could be deleted en-masse or to provide a shortcut to perform that specific action such as a 'Purge Authors who have no books' button
Author
Owner

@advplyr commented on GitHub (Jan 23, 2024):

As of the current version (v2.7.2) authors with 0 books are removed automatically if asin, description and imagePath has not been set on the author. This is to prevent removing an author that the user filled out details for.

https://github.com/advplyr/audiobookshelf/blob/19e18036334d5a44525f9b6fef745e5faf4c2f1b/server/scanner/BookScanner.js#L838-L878

@advplyr commented on GitHub (Jan 23, 2024): As of the current version (v2.7.2) authors with 0 books are removed automatically if `asin`, `description` and `imagePath` has not been set on the author. This is to prevent removing an author that the user filled out details for. https://github.com/advplyr/audiobookshelf/blob/19e18036334d5a44525f9b6fef745e5faf4c2f1b/server/scanner/BookScanner.js#L838-L878
Author
Owner

@StarOverSky commented on GitHub (Jan 23, 2024):

"authors with 0 books are removed automatically"

I don't see this happening. in 2.7.2

Screenshot 2024-01-23 at 9 37 36 AM Screenshot 2024-01-23 at 9 39 09 AM Screenshot 2024-01-23 at 9 39 06 AM Screenshot 2024-01-23 at 9 38 51 AM Screenshot 2024-01-23 at 9 38 45 AM Screenshot 2024-01-23 at 9 38 08 AM Screenshot 2024-01-23 at 9 38 01 AM Screenshot 2024-01-23 at 9 37 40 AM
@StarOverSky commented on GitHub (Jan 23, 2024): "authors with 0 books are removed automatically" I don't see this happening. in 2.7.2 <img width="587" alt="Screenshot 2024-01-23 at 9 37 36 AM" src="https://github.com/advplyr/audiobookshelf/assets/2897699/9e7aec00-662e-4742-87fc-4d26f1d3d583"> <img width="933" alt="Screenshot 2024-01-23 at 9 39 09 AM" src="https://github.com/advplyr/audiobookshelf/assets/2897699/acd88a40-9603-4a9f-af35-cd02646c2489"> <img width="667" alt="Screenshot 2024-01-23 at 9 39 06 AM" src="https://github.com/advplyr/audiobookshelf/assets/2897699/52470750-c4f1-47b2-aefa-20a341a7d657"> <img width="863" alt="Screenshot 2024-01-23 at 9 38 51 AM" src="https://github.com/advplyr/audiobookshelf/assets/2897699/dcbb82de-2aef-4807-8f3a-3ac77169e7f6"> <img width="665" alt="Screenshot 2024-01-23 at 9 38 45 AM" src="https://github.com/advplyr/audiobookshelf/assets/2897699/407e2919-3f08-455e-9f11-0ea74c8d8bbe"> <img width="906" alt="Screenshot 2024-01-23 at 9 38 08 AM" src="https://github.com/advplyr/audiobookshelf/assets/2897699/f58272fc-3248-4932-872b-d60c991e6c86"> <img width="390" alt="Screenshot 2024-01-23 at 9 38 01 AM" src="https://github.com/advplyr/audiobookshelf/assets/2897699/2a23978e-7ce1-4654-98e7-deb9b3b836c8"> <img width="789" alt="Screenshot 2024-01-23 at 9 37 40 AM" src="https://github.com/advplyr/audiobookshelf/assets/2897699/bf6fa9ea-eb0b-403c-8138-93a3890efa09">
Author
Owner

@advplyr commented on GitHub (Jan 23, 2024):

Yeah looks like there is a bug somewhere. With regular scans it should work but I'll have to test more when user does manual edits

@advplyr commented on GitHub (Jan 23, 2024): Yeah looks like there is a bug somewhere. With regular scans it should work but I'll have to test more when user does manual edits
Author
Owner

@StarOverSky commented on GitHub (Jan 24, 2024):

When you say "With regular scans" what specifically do you mean? Doing Library Scan from Setting - Libraries does not cleanup Authors with 0 books.

After doing a full scan of the library, I get 55 results for Authors with 0 books.
Screenshot 2024-01-23 at 5 58 13 PM

@StarOverSky commented on GitHub (Jan 24, 2024): When you say "With regular scans" what specifically do you mean? Doing Library Scan from Setting - Libraries does not cleanup Authors with 0 books. After doing a full scan of the library, I get 55 results for Authors with 0 books. <img width="1078" alt="Screenshot 2024-01-23 at 5 58 13 PM" src="https://github.com/advplyr/audiobookshelf/assets/2897699/7949fe25-3591-4ddc-8959-3538a382cce5">
Author
Owner

@ZLoth commented on GitHub (Apr 13, 2024):

Here is a screenshot from my end. This is probably because of one of two things:

  • The metadata in the MP3 tags had the Narriator/Author switched around, and was subsequently fixed through a Audible library match. This is with books that I had purchased through Humble Bundle.
  • I had books which were initially in the "Fiction" section, but were subsequently moved to a new library called "Science Fiction & Fantasy".

image

@ZLoth commented on GitHub (Apr 13, 2024): Here is a screenshot from my end. This is probably because of one of two things: - The metadata in the MP3 tags had the Narriator/Author switched around, and was subsequently fixed through a Audible library match. This is with books that I had purchased through Humble Bundle. - I had books which were initially in the "Fiction" section, but were subsequently moved to a new library called "Science Fiction & Fantasy". ![image](https://github.com/advplyr/audiobookshelf/assets/6700159/499de425-eb07-43ff-afb3-018184c1998c)
Author
Owner

@Harwood commented on GitHub (Jun 30, 2024):

I was able to clean up my authors with the following sql query against /config/absdatabase.sqlite.

DELETE
FROM authors
WHERE id NOT IN (
	SELECT authorId
	FROM authors
	JOIN bookAuthors ON (
		authors.id = bookAuthors.authorId
	)
)
@Harwood commented on GitHub (Jun 30, 2024): I was able to clean up my authors with the following sql query against `/config/absdatabase.sqlite`. ```sql DELETE FROM authors WHERE id NOT IN ( SELECT authorId FROM authors JOIN bookAuthors ON ( authors.id = bookAuthors.authorId ) ) ```
Author
Owner

@nichwall commented on GitHub (Nov 27, 2024):

+1 from me, should be able to have internal ratings, but import ratins from metadata provider such as goodreads or audible :)

I think you posted this on the wrong issue?

@nichwall commented on GitHub (Nov 27, 2024): > +1 from me, should be able to have internal ratings, but import ratins from metadata provider such as goodreads or audible :) I think you posted this on the wrong issue?
Author
Owner

@ameeno commented on GitHub (Nov 27, 2024):

+1 from me, should be able to have internal ratings, but import ratins from metadata provider such as goodreads or audible :)

I think you posted this on the wrong issue?

Yup :p too many tabs.

@ameeno commented on GitHub (Nov 27, 2024): > > +1 from me, should be able to have internal ratings, but import ratins from metadata provider such as goodreads or audible :) > > I think you posted this on the wrong issue? Yup :p too many tabs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1625