[PR #4795] [Enhancement] Simple ratings from audible.com & custom providers #4349

Open
opened 2026-04-25 00:19:23 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/4795
Author: @danieljrich
Created: 11/3/2025
Status: 🔄 Open

Base: masterHead: master


📝 Commits (8)

  • 831d503 [Enhancement] Simple ratings from audible.com
  • e7d0771 remove unneeded asin reference
  • ec27323 add rating support on custom metadata
  • 4cb8098 fix types and simplify
  • 7377f6a fix undefined in custom provider
  • 35862ae bit more clean up
  • 4b83e74 toggle switch off by default
  • c0ed3af Merge branch 'master' into master

📊 Changes

19 files changed (+243 additions, -7 deletions)

View changed files

📝 client/components/cards/BookMatchCard.vue (+20 -1)
📝 client/components/cards/LazyBookCard.vue (+6 -0)
📝 client/components/controls/LibrarySortSelect.vue (+4 -0)
📝 client/components/modals/item/tabs/Match.vue (+28 -1)
📝 client/components/ui/TextInputWithLabel.vue (+3 -1)
📝 client/components/widgets/BookDetailsEdit.vue (+20 -0)
📝 client/pages/config/index.vue (+10 -0)
📝 client/pages/item/_id/index.vue (+16 -0)
📝 client/strings/en-us.json (+4 -0)
📝 custom-metadata-provider-specification.yaml (+6 -0)
📝 server/migrations/changelog.md (+2 -0)
server/migrations/v2.31.0-add-book-rating.js (+68 -0)
📝 server/models/Book.js (+27 -0)
📝 server/models/LibraryItem.js (+1 -0)
📝 server/objects/settings/ServerSettings.js (+3 -0)
📝 server/providers/CustomProviderAdapter.js (+3 -2)
📝 server/scanner/BookScanner.js (+1 -0)
📝 server/scanner/Scanner.js (+18 -2)
📝 server/utils/queries/libraryItemsBookFilters.js (+3 -0)

📄 Description

Brief summary

Adds star rating support for audiobooks, displaying ratings from Audible.com when available and allowing manual rating entry/editing.

NOTE: this will only affect new items. In order to get rating for existing items, quick-match will need to be run server-wide

Which issue is fixed?

N/A - New feature

In-depth Description

This PR adds star rating functionality for audiobooks:

  • Database: Adds rating column to books table (FLOAT, nullable)
  • Display: Shows 5-star ratings with half-star support on:
    • Item details page (below author name)
    • Match card in match modal
    • Sort by rating option in library dropdown
    • Subtitle display when sorting by rating
  • Editing: Rating can be added/edited in the Details tab and Match modal
  • Removal: Setting rating to 0 removes it (saves as null)
  • Sorting: New "Rating" option in sort dropdown with proper null handling

Rating values come from Audible metadata when matching, but can also be manually entered for any book regardless of ASIN.

How have you tested this?

  1. Matched a book from Audible.com and verified rating displays with stars
  2. Manually added/edited ratings in Details tab
  3. Set rating to 0 to verify it gets removed
  4. Sorted library by rating and verified display (asc, and dec)
  5. Verified ratings show in match modal and can be edited there
  6. Quick-Match on existing matched item successfully added rating.

Screenshots

rating on item
image
sort by rating
image

set to 0 to remove
image

no stars if set to 0
image

rating on match view
image


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/4795 **Author:** [@danieljrich](https://github.com/danieljrich) **Created:** 11/3/2025 **Status:** 🔄 Open **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (8) - [`831d503`](https://github.com/advplyr/audiobookshelf/commit/831d50320ce2cf6e63b9294ccd6fd2fe65a8974a) [Enhancement] Simple ratings from audible.com - [`e7d0771`](https://github.com/advplyr/audiobookshelf/commit/e7d077126170be5054de37ed6461e42cbda848f9) remove unneeded asin reference - [`ec27323`](https://github.com/advplyr/audiobookshelf/commit/ec27323a6496c988f36eba9488477ac29c28aec5) add rating support on custom metadata - [`4cb8098`](https://github.com/advplyr/audiobookshelf/commit/4cb8098fa02aafe1b3e70ad977904e6d376ca9cc) fix types and simplify - [`7377f6a`](https://github.com/advplyr/audiobookshelf/commit/7377f6adaa7bcb1651d7914a8dbdbca73288e577) fix undefined in custom provider - [`35862ae`](https://github.com/advplyr/audiobookshelf/commit/35862aec9b9506f069165a77b5fac82b63879a39) bit more clean up - [`4b83e74`](https://github.com/advplyr/audiobookshelf/commit/4b83e740c1c96c61e8aa1d35efd0885f506584fa) toggle switch off by default - [`c0ed3af`](https://github.com/advplyr/audiobookshelf/commit/c0ed3afe308092b70698c2404f15d87a5cbfd4f2) Merge branch 'master' into master ### 📊 Changes **19 files changed** (+243 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `client/components/cards/BookMatchCard.vue` (+20 -1) 📝 `client/components/cards/LazyBookCard.vue` (+6 -0) 📝 `client/components/controls/LibrarySortSelect.vue` (+4 -0) 📝 `client/components/modals/item/tabs/Match.vue` (+28 -1) 📝 `client/components/ui/TextInputWithLabel.vue` (+3 -1) 📝 `client/components/widgets/BookDetailsEdit.vue` (+20 -0) 📝 `client/pages/config/index.vue` (+10 -0) 📝 `client/pages/item/_id/index.vue` (+16 -0) 📝 `client/strings/en-us.json` (+4 -0) 📝 `custom-metadata-provider-specification.yaml` (+6 -0) 📝 `server/migrations/changelog.md` (+2 -0) ➕ `server/migrations/v2.31.0-add-book-rating.js` (+68 -0) 📝 `server/models/Book.js` (+27 -0) 📝 `server/models/LibraryItem.js` (+1 -0) 📝 `server/objects/settings/ServerSettings.js` (+3 -0) 📝 `server/providers/CustomProviderAdapter.js` (+3 -2) 📝 `server/scanner/BookScanner.js` (+1 -0) 📝 `server/scanner/Scanner.js` (+18 -2) 📝 `server/utils/queries/libraryItemsBookFilters.js` (+3 -0) </details> ### 📄 Description ## Brief summary Adds star rating support for audiobooks, displaying ratings from Audible.com when available and allowing manual rating entry/editing. **NOTE: this will only affect new items. In order to get rating for existing items, quick-match will need to be run server-wide** ## Which issue is fixed? N/A - New feature ## In-depth Description This PR adds star rating functionality for audiobooks: - **Database**: Adds `rating` column to `books` table (FLOAT, nullable) - **Display**: Shows 5-star ratings with half-star support on: - Item details page (below author name) - Match card in match modal - Sort by rating option in library dropdown - Subtitle display when sorting by rating - **Editing**: Rating can be added/edited in the Details tab and Match modal - **Removal**: Setting rating to 0 removes it (saves as null) - **Sorting**: New "Rating" option in sort dropdown with proper null handling Rating values come from Audible metadata when matching, but can also be manually entered for any book regardless of ASIN. ## How have you tested this? 1. Matched a book from Audible.com and verified rating displays with stars 2. Manually added/edited ratings in Details tab 3. Set rating to 0 to verify it gets removed 4. Sorted library by rating and verified display (asc, and dec) 5. Verified ratings show in match modal and can be edited there 6. Quick-Match on existing matched item successfully added rating. ## Screenshots rating on item <img width="236" height="181" alt="image" src="https://github.com/user-attachments/assets/8d2be825-cc0a-48ae-8ed0-9542dc67ad12" /> sort by rating <img width="518" height="450" alt="image" src="https://github.com/user-attachments/assets/ad91c82d-3d43-452b-97df-6c1fce65607b" /> set to 0 to remove <img width="220" height="71" alt="image" src="https://github.com/user-attachments/assets/01a4dbf6-aa73-4cb3-9556-e750e3457691" /> no stars if set to 0 <img width="320" height="201" alt="image" src="https://github.com/user-attachments/assets/4cf53b92-6244-4245-a2ad-380559cb2025" /> rating on match view <img width="346" height="192" alt="image" src="https://github.com/user-attachments/assets/bf29c709-6d18-4917-a5b2-654c869334c0" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:19:23 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#4349