[PR #3185] [MERGED] Adds genres to gloabl search #3894

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

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/3185
Author: @mikiher
Created: 7/21/2024
Status: Merged
Merged: 7/21/2024
Merged by: @advplyr

Base: masterHead: genre-search


📝 Commits (5)

  • bff5622 Adds genres to gloabl search
  • ec395be fix: Encode search query parameter in GlobalSearch.vue
  • 0476b68 fix: Encode search query parameter in search.vue
  • 3223011 Fix:Switching libraries on search page losing q query string
  • a191dab Show numItems and numBooks on search cards

📊 Changes

10 files changed (+165 additions, -78 deletions)

View changed files

📝 client/components/cards/AuthorSearchCard.vue (+6 -2)
client/components/cards/GenreSearchCard.vue (+36 -0)
📝 client/components/cards/NarratorSearchCard.vue (+5 -3)
📝 client/components/cards/TagSearchCard.vue (+5 -3)
📝 client/components/controls/GlobalSearch.vue (+19 -7)
📝 client/components/ui/LibrariesDropdown.vue (+4 -3)
📝 client/pages/library/_library/search.vue (+2 -2)
📝 client/strings/en-us.json (+2 -0)
📝 server/utils/queries/libraryItemsBookFilters.js (+20 -1)
📝 server/utils/queries/libraryItemsPodcastFilters.js (+66 -57)

📄 Description

Fixes #2937

This adds genres to the global search dropdown (for both Books and Podcast libraries).

Since the number of results in the dropdown is limited, I also added "ORDER By numItems DESC" to the tags and genres search queries, so we return the most useful ones first.

I chose "category" from the material symbols to denote genres. Please feel free to replace this with anything else.


🔄 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/3185 **Author:** [@mikiher](https://github.com/mikiher) **Created:** 7/21/2024 **Status:** ✅ Merged **Merged:** 7/21/2024 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `genre-search` --- ### 📝 Commits (5) - [`bff5622`](https://github.com/advplyr/audiobookshelf/commit/bff56220c212b3152203abde0b48cd40aea380e2) Adds genres to gloabl search - [`ec395be`](https://github.com/advplyr/audiobookshelf/commit/ec395bed7282c975f80c18cd77df495c606704c4) fix: Encode search query parameter in GlobalSearch.vue - [`0476b68`](https://github.com/advplyr/audiobookshelf/commit/0476b685850d70762c2a3d3f14a9d379c91dcd2f) fix: Encode search query parameter in search.vue - [`3223011`](https://github.com/advplyr/audiobookshelf/commit/3223011b138320dd38e5f7885df5e6b32ed6c824) Fix:Switching libraries on search page losing q query string - [`a191dab`](https://github.com/advplyr/audiobookshelf/commit/a191dab359e950a9b4cc3ea372caa606bdff1cd7) Show numItems and numBooks on search cards ### 📊 Changes **10 files changed** (+165 additions, -78 deletions) <details> <summary>View changed files</summary> 📝 `client/components/cards/AuthorSearchCard.vue` (+6 -2) ➕ `client/components/cards/GenreSearchCard.vue` (+36 -0) 📝 `client/components/cards/NarratorSearchCard.vue` (+5 -3) 📝 `client/components/cards/TagSearchCard.vue` (+5 -3) 📝 `client/components/controls/GlobalSearch.vue` (+19 -7) 📝 `client/components/ui/LibrariesDropdown.vue` (+4 -3) 📝 `client/pages/library/_library/search.vue` (+2 -2) 📝 `client/strings/en-us.json` (+2 -0) 📝 `server/utils/queries/libraryItemsBookFilters.js` (+20 -1) 📝 `server/utils/queries/libraryItemsPodcastFilters.js` (+66 -57) </details> ### 📄 Description Fixes #2937 This adds genres to the global search dropdown (for both Books and Podcast libraries). Since the number of results in the dropdown is limited, I also added "ORDER By numItems DESC" to the tags and genres search queries, so we return the most useful ones first. I chose "category" from the material symbols to denote genres. Please feel free to replace this with anything else. --- <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:17:28 +02:00
adam closed this issue 2026-04-25 00:17:28 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3894