Fix artist search case sensitivity with metadata APIs

Some metadata APIs return fewer or no results for all-lowercase
queries. Title-case the query when it's all lowercase before
sending to the API ("foreigner" → "Foreigner"). Mixed-case input
is left as-is. Confidence scoring still uses the original query.
This commit is contained in:
Broque Thomas 2026-04-20 08:01:55 -07:00
parent 8eec0c49ef
commit c8fcb4626a
2 changed files with 6 additions and 3 deletions

View file

@ -16185,12 +16185,14 @@ def search_match():
hydrabase_worker.enqueue(query, context)
if context == 'artist':
# Search for artists
# Search for artists — title-case the query for better API results
# (some metadata APIs return fewer results for all-lowercase queries)
search_query = query.title() if query == query.lower() else query
if use_hydrabase:
artist_matches = hydrabase_client.search_artists(query, limit=8)
artist_matches = hydrabase_client.search_artists(search_query, limit=8)
provider = 'hydrabase'
else:
artist_matches = _get_metadata_fallback_client().search_artists(query, limit=8)
artist_matches = _get_metadata_fallback_client().search_artists(search_query, limit=8)
provider = _get_metadata_fallback_source()
results = []

View file

@ -3603,6 +3603,7 @@ const WHATS_NEW = {
// --- April 19, 2026 ---
{ date: 'April 19, 2026' },
{ title: 'Fix Wishlist Albums Cycle Stuck at 1 Concurrent', desc: 'Auto-wishlist processing during the "albums" cycle was limited to 1 concurrent download even with higher configured settings. The max_concurrent=1 restriction is only needed for Soulseek folder-based album grabs, not individual wishlist track downloads. Albums cycle now uses the configured concurrency like singles' },
{ title: 'Fix Artist Search Case Sensitivity', desc: 'Artist search on the Artists page now normalizes all-lowercase queries to title case before hitting metadata APIs. Some APIs return fewer or no results for lowercase queries like "foreigner" vs "Foreigner"' },
{ title: 'Lidarr Download Source Now Production-Ready', desc: 'Lidarr is now a fully functional download source with complete orchestrator integration. Downloads appear in the UI, status polling works, cancellation works, and cleanup on shutdown works. Error messages are now visible in the download list. Removed "(Development)" label' },
{ title: 'Fix M3U Showing All Tracks as Missing', desc: 'M3U playlist files were generated before post-processing finished, so file paths pointed to download locations instead of final library paths. M3U is now regenerated from the backend after all post-processing completes, resolving real library paths from the DB' },
{ title: 'Fix AcoustID Retag Not Writing to File', desc: 'The AcoustID mismatch "Retag" fix action was only updating the database record without writing corrected tags to the actual audio file. Now writes title and artist tags to the file using Mutagen after updating the DB' },