From c8fcb4626a10275f33856eac58aeb4014d6c6ae7 Mon Sep 17 00:00:00 2001 From: Broque Thomas <26755000+Nezreka@users.noreply.github.com> Date: Mon, 20 Apr 2026 08:01:55 -0700 Subject: [PATCH] Fix artist search case sensitivity with metadata APIs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- web_server.py | 8 +++++--- webui/static/helper.js | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/web_server.py b/web_server.py index b62615ad..51af3fb6 100644 --- a/web_server.py +++ b/web_server.py @@ -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 = [] diff --git a/webui/static/helper.js b/webui/static/helper.js index 2701de03..3be1a972 100644 --- a/webui/static/helper.js +++ b/webui/static/helper.js @@ -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' },