[PR #4750] [MERGED] Add metadata providers API and use them on web client #4338

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

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/4750
Author: @mikiher
Created: 10/15/2025
Status: Merged
Merged: 10/22/2025
Merged by: @advplyr

Base: masterHead: providers-api


📝 Commits (10+)

  • 4f30cbf SearchController: New providers API, query param validation
  • 1da3ab7 ApiRouter: New provider API routes
  • ce4ff4f Client: Use new server providers API
  • 888190a Fix codeQL failures
  • 3f6162f CodeQL fix: limit parameter sizes
  • 0a82d6a CoverSearchManager: Fix broken podcast cover search
  • 0a8662d Merge providers API into a single endpoint
  • b01e757 Remove custom providers from library filterdata request
  • 1412115 Merge provider actions and mutations, add loaded state
  • 816a47a Remove custom providers from library fetch action

📊 Changes

18 files changed (+357 additions, -206 deletions)

View changed files

📝 .github/workflows/codeql.yml (+3 -3)
📝 client/components/modals/BatchQuickMatchModel.vue (+5 -3)
📝 client/components/modals/item/tabs/Cover.vue (+4 -2)
📝 client/components/modals/item/tabs/Match.vue (+41 -14)
📝 client/components/modals/libraries/EditLibrary.vue (+3 -1)
📝 client/components/modals/libraries/LibrarySettings.vue (+0 -5)
📝 client/layouts/default.vue (+4 -2)
📝 client/pages/config/index.vue (+4 -1)
📝 client/pages/upload/index.vue (+3 -1)
📝 client/store/libraries.js (+0 -3)
📝 client/store/scanners.js (+46 -112)
📝 server/controllers/LibraryController.js (+0 -2)
📝 server/controllers/SearchController.js (+166 -49)
📝 server/finders/BookFinder.js (+10 -2)
📝 server/finders/PodcastFinder.js (+10 -6)
📝 server/managers/CoverSearchManager.js (+3 -0)
📝 server/routers/ApiRouter.js (+1 -0)
📝 server/utils/index.js (+54 -0)

📄 Description

Brief summary

Up until now, the client maintained its own list of providers, and that was always in danger of getting out of sync with the server.
This PR adds new API endpoints to get the different providers.

Which issue is fixed?

This didn't have an associated bug, but on the way it fixes #3820

In-depth Description

Changes in the server

These API endpoints were added:

    this.router.get('/search/providers/books', SearchController.getBookProviders.bind(this))
    this.router.get('/search/providers/books/covers', SearchController.getBookCoverProviders.bind(this))
    this.router.get('/search/providers/podcasts', SearchController.getPodcastProviders.bind(this))
    this.router.get('/search/providers/podcasts/covers', SearchController.getPodcastCoverProviders.bind(this))
    this.router.get('/search/providers/authors', SearchController.getAuthorProviders.bind(this))
    this.router.get('/search/providers/chapters', SearchController.getChapterProviders.bind(this)

Notes:

  • Book Cover providers include cover-only providers, and All and Best options
  • All providers include relevant custom metadata providers.
  • Also took the chance to validate query parameters for existing /search API in SearchController.

Changes in the client

  • Prefetched all used lists in layout init (layouts/default.vue)
  • Updated relevant lists when custom providers is added/removed
  • Changed store/scanners.js state, getters, actions, and mutations to use the new api
  • Made required changes in users of scanners.js
  • Removed unnecessary fetches of lists - all fetches are now initiated from layouts/default.vue

Notes:

  • The author and chapter providers are not used currently in the client, as there's only one provider - we can add them in the future if needed.

How have you tested this?

  • Checked that Match and Cover tabs contain all providers as before (for books and podcasts)
  • Checked that LibraryEdit shows all available providers including custom ones.
  • Checked that BatchQuickMatchModal displays available providers.

🔄 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/4750 **Author:** [@mikiher](https://github.com/mikiher) **Created:** 10/15/2025 **Status:** ✅ Merged **Merged:** 10/22/2025 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `providers-api` --- ### 📝 Commits (10+) - [`4f30cbf`](https://github.com/advplyr/audiobookshelf/commit/4f30cbf2f652362f2fcb4ac1baa1af3104ad9fb5) SearchController: New providers API, query param validation - [`1da3ab7`](https://github.com/advplyr/audiobookshelf/commit/1da3ab7fdc819ad71271098bba1f186de058fc7a) ApiRouter: New provider API routes - [`ce4ff4f`](https://github.com/advplyr/audiobookshelf/commit/ce4ff4f894ea5e924ac64429c3fa8fa772f210d0) Client: Use new server providers API - [`888190a`](https://github.com/advplyr/audiobookshelf/commit/888190a6be4c103b6eec3e5c0f97f678eda87900) Fix codeQL failures - [`3f6162f`](https://github.com/advplyr/audiobookshelf/commit/3f6162f53c3246963cbbaaa1697043a3119cfd89) CodeQL fix: limit parameter sizes - [`0a82d6a`](https://github.com/advplyr/audiobookshelf/commit/0a82d6a41b5662ee681bdecf1e922824f427fda5) CoverSearchManager: Fix broken podcast cover search - [`0a8662d`](https://github.com/advplyr/audiobookshelf/commit/0a8662d1983736ea36fb76a3bfd028f6e2586106) Merge providers API into a single endpoint - [`b01e757`](https://github.com/advplyr/audiobookshelf/commit/b01e7570d398b20e300c87a80d61a82aa903041b) Remove custom providers from library filterdata request - [`1412115`](https://github.com/advplyr/audiobookshelf/commit/141211590f15c2ac6485e6ed09e8fe0f57a048f8) Merge provider actions and mutations, add loaded state - [`816a47a`](https://github.com/advplyr/audiobookshelf/commit/816a47a4bac71ed4415e4923e99980a0150ce049) Remove custom providers from library fetch action ### 📊 Changes **18 files changed** (+357 additions, -206 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/codeql.yml` (+3 -3) 📝 `client/components/modals/BatchQuickMatchModel.vue` (+5 -3) 📝 `client/components/modals/item/tabs/Cover.vue` (+4 -2) 📝 `client/components/modals/item/tabs/Match.vue` (+41 -14) 📝 `client/components/modals/libraries/EditLibrary.vue` (+3 -1) 📝 `client/components/modals/libraries/LibrarySettings.vue` (+0 -5) 📝 `client/layouts/default.vue` (+4 -2) 📝 `client/pages/config/index.vue` (+4 -1) 📝 `client/pages/upload/index.vue` (+3 -1) 📝 `client/store/libraries.js` (+0 -3) 📝 `client/store/scanners.js` (+46 -112) 📝 `server/controllers/LibraryController.js` (+0 -2) 📝 `server/controllers/SearchController.js` (+166 -49) 📝 `server/finders/BookFinder.js` (+10 -2) 📝 `server/finders/PodcastFinder.js` (+10 -6) 📝 `server/managers/CoverSearchManager.js` (+3 -0) 📝 `server/routers/ApiRouter.js` (+1 -0) 📝 `server/utils/index.js` (+54 -0) </details> ### 📄 Description ## Brief summary Up until now, the client maintained its own list of providers, and that was always in danger of getting out of sync with the server. This PR adds new API endpoints to get the different providers. ## Which issue is fixed? This didn't have an associated bug, but on the way it fixes #3820 ## In-depth Description ### Changes in the server These API endpoints were added: ```js this.router.get('/search/providers/books', SearchController.getBookProviders.bind(this)) this.router.get('/search/providers/books/covers', SearchController.getBookCoverProviders.bind(this)) this.router.get('/search/providers/podcasts', SearchController.getPodcastProviders.bind(this)) this.router.get('/search/providers/podcasts/covers', SearchController.getPodcastCoverProviders.bind(this)) this.router.get('/search/providers/authors', SearchController.getAuthorProviders.bind(this)) this.router.get('/search/providers/chapters', SearchController.getChapterProviders.bind(this) ``` Notes: - Book Cover providers include cover-only providers, and All and Best options - All providers include relevant custom metadata providers. - Also took the chance to validate query parameters for existing /search API in SearchController. ### Changes in the client - Prefetched all used lists in layout init (`layouts/default.vue`) - Updated relevant lists when custom providers is added/removed - Changed `store/scanners.js` state, getters, actions, and mutations to use the new api - Made required changes in users of `scanners.js` - Removed unnecessary fetches of lists - all fetches are now initiated from `layouts/default.vue` Notes: - The author and chapter providers are not used currently in the client, as there's only one provider - we can add them in the future if needed. ## How have you tested this? - Checked that Match and Cover tabs contain all providers as before (for books and podcasts) - Checked that LibraryEdit shows all available providers including custom ones. - Checked that BatchQuickMatchModal displays available providers. --- <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:21 +02:00
adam closed this issue 2026-04-25 00:19:21 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#4338