From e90fc0fb7f6fa15051b5e885b204686cd2424ffa Mon Sep 17 00:00:00 2001 From: Ewan Croft Date: Thu, 13 Aug 2026 14:45:13 +0100 Subject: [PATCH] fix(tourmaline): remove leftover debug logging from genre profile builder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit buildGenreProfile logged a line per non-matched artist plus two summary lines on every call — noisy in production and, for large libraries, a real amount of console spam on every one of the (up to 5) per-range profile computations. --- packages/tourmaline/src/lib/analysis/genres.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/packages/tourmaline/src/lib/analysis/genres.ts b/packages/tourmaline/src/lib/analysis/genres.ts index ed82134..99acaf1 100644 --- a/packages/tourmaline/src/lib/analysis/genres.ts +++ b/packages/tourmaline/src/lib/analysis/genres.ts @@ -148,16 +148,10 @@ export function buildGenreProfile( artistInfos: Map, ): GenreEntry[] { const genreWeights = new Map(); - console.log( - `[tourmaline] building genre profile, artistCounts: ${data.artistPlayCounts.size}, artistInfos: ${artistInfos.size}`, - ); for (const [name, count] of data.artistPlayCounts) { const info = artistInfos.get(name); - if (!info) { - console.log(`[tourmaline] artist not in info: ${name}`); - continue; - } + if (!info) continue; const allRaw = [...info.genres, ...info.tags]; const seen = new Set(); @@ -170,12 +164,10 @@ export function buildGenreProfile( } } - const result = [...genreWeights.entries()] + return [...genreWeights.entries()] .map(([name, weight]) => ({ name, weight })) .sort((a, b) => b.weight - a.weight) .slice(0, 20); - console.log(`[tourmaline] genre result: ${result.length} genres`); - return result; } /** -- 2.51.2