From c30b367e07701ff2fe570cc03f2d331ff9e1e76c Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Wed, 4 Feb 2026 20:14:34 -0600 Subject: [PATCH] fix(suggestions): expand incompatible genre list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add more genres and keywords to filter: - Electronic/Dance: trance, techno, house, EDM, dubstep, etc. - Spoken word: audiobook, hörbuch, podcast, meditation, ASMR - Country: country, bluegrass, americana - New age: healing, spa, yoga, mindfulness - Additional title keywords: "gelesen von", "read by", "trance mix" This prevents suggestions like: - Tony Parsons (trance DJ) in Iron Maiden playlist - Tony Parsons (German audiobook narrator) in metal playlist --- src-tauri/src/artist_vectors/suggestions.rs | 41 +++++++++++++++++++-- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/src-tauri/src/artist_vectors/suggestions.rs b/src-tauri/src/artist_vectors/suggestions.rs index 7b4bff4ef..ba57736ed 100644 --- a/src-tauri/src/artist_vectors/suggestions.rs +++ b/src-tauri/src/artist_vectors/suggestions.rs @@ -472,12 +472,28 @@ impl SuggestionsEngine { async fn has_incompatible_genre(&self, client: &QobuzClient, artist_id: u64, artist_name: &str) -> bool { // Incompatible genre keywords - these would never appear in a rock/metal context const INCOMPATIBLE_GENRES: &[&str] = &[ + // Latin/Tropical "bachata", "merengue", "reggaeton", "salsa", "cumbia", "vallenato", + "latin pop", "tropical", "urbano latino", "regional mexicano", + // Asian pop "k-pop", "kpop", "j-pop", "jpop", "mandopop", "cantopop", - "schlager", "volksmusi", "chanson", - "gospel", "christian", - "children", "nursery", "lullaby", - "latin pop", "tropical", "urbano latino", + // European folk/schlager + "schlager", "volksmusi", "chanson", "volksmusik", + // Religious + "gospel", "christian", "worship", "religious", + // Children/Family + "children", "nursery", "lullaby", "kids", "kindermusik", + // Electronic/Dance (club-oriented) + "trance", "techno", "house", "edm", "dubstep", "drum and bass", + "hardstyle", "eurodance", "hands up", "happy hardcore", + // Spoken word/Non-music + "audiobook", "spoken word", "podcast", "meditation", "asmr", + "relaxation", "sleep", "nature sounds", "white noise", + "comedy", "stand-up", "hörbuch", "hörspiel", + // Country (usually incompatible with metal) + "country", "bluegrass", "americana country", + // New age/Wellness + "new age", "healing", "spa", "yoga", "mindfulness", ]; // Fetch artist with a few albums @@ -511,6 +527,23 @@ impl SuggestionsEngine { return true; } } + + // Additional title-based checks for non-music content + const INCOMPATIBLE_TITLE_KEYWORDS: &[&str] = &[ + "audiobook", "hörbuch", "hörspiel", "gelesen von", "read by", + "narrated by", "lesung", "märchen", "fairy tale", + "meditation", "relaxation", "sleep music", "yoga music", + "trance mix", "club mix", "dance mix", "dj mix", + ]; + for keyword in INCOMPATIBLE_TITLE_KEYWORDS { + if title_lower.contains(keyword) { + log::debug!( + "[SuggestionsEngine] Artist '{}' has incompatible album title keyword '{}': '{}'", + artist_name, keyword, album.title + ); + return true; + } + } } } false