From 8c145c29cdf7c100739c401784496e0c89c62d37 Mon Sep 17 00:00:00 2001 From: Broque Thomas Date: Thu, 26 Feb 2026 14:17:43 -0800 Subject: [PATCH] Raise min_confidence thresholds to 0.9 Increase the minimum confidence cutoff to 0.9 in multiple discovery/search routines to reduce false positives. Affected functions: _search_spotify_for_tidal_track, _run_youtube_discovery_worker, _run_listenbrainz_discovery_worker, and _run_beatport_discovery_worker. This tightens matching criteria (previously 0.6/0.7/0.75) to favor higher-confidence matches, potentially reducing incorrect matches at the cost of fewer total matches. --- web_server.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web_server.py b/web_server.py index 40535599..baba3a60 100644 --- a/web_server.py +++ b/web_server.py @@ -18679,7 +18679,7 @@ def _search_spotify_for_tidal_track(tidal_track, use_spotify=True, itunes_client best_match = None best_match_raw = None best_confidence = 0.0 - min_confidence = 0.7 + min_confidence = 0.9 for query_idx, search_query in enumerate(search_queries): try: @@ -19200,7 +19200,7 @@ def _run_youtube_discovery_worker(url_hash): matched_track = None best_confidence = 0.0 best_raw_track = None - min_confidence = 0.6 + min_confidence = 0.9 source_duration = track.get('duration_ms', 0) or 0 # Strategy 1: Use matching_engine search queries @@ -19463,7 +19463,7 @@ def _run_listenbrainz_discovery_worker(playlist_mbid): matched_track = None best_confidence = 0.0 best_raw_track = None - min_confidence = 0.6 + min_confidence = 0.9 source_duration = duration_ms or 0 # Strategy 1: Use matching_engine search queries @@ -25969,7 +25969,7 @@ def _run_beatport_discovery_worker(url_hash): found_track = None best_confidence = 0.0 best_raw_track = None - min_confidence = 0.75 # Higher threshold for Beatport to avoid bad matches + min_confidence = 0.9 # Higher threshold for Beatport to avoid bad matches # Generate search queries using matching engine (with fallback) try: