fix(suggestions): expand incompatible genre list
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
This commit is contained in:
1 parent
c03c5e525c
commit
c30b367e07
1 file changed
+37
-4
@@ -472,12 +472,28 @@ impl SuggestionsEngine {
|
|||||||
async fn has_incompatible_genre(&self, client: &QobuzClient, artist_id: u64, artist_name: &str) -> bool {
|
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
|
// Incompatible genre keywords - these would never appear in a rock/metal context
|
||||||
const INCOMPATIBLE_GENRES: &[&str] = &[
|
const INCOMPATIBLE_GENRES: &[&str] = &[
|
||||||
|
// Latin/Tropical
|
||||||
"bachata", "merengue", "reggaeton", "salsa", "cumbia", "vallenato",
|
"bachata", "merengue", "reggaeton", "salsa", "cumbia", "vallenato",
|
||||||
|
"latin pop", "tropical", "urbano latino", "regional mexicano",
|
||||||
|
// Asian pop
|
||||||
"k-pop", "kpop", "j-pop", "jpop", "mandopop", "cantopop",
|
"k-pop", "kpop", "j-pop", "jpop", "mandopop", "cantopop",
|
||||||
"schlager", "volksmusi", "chanson",
|
// European folk/schlager
|
||||||
"gospel", "christian",
|
"schlager", "volksmusi", "chanson", "volksmusik",
|
||||||
"children", "nursery", "lullaby",
|
// Religious
|
||||||
"latin pop", "tropical", "urbano latino",
|
"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
|
// Fetch artist with a few albums
|
||||||
@@ -511,6 +527,23 @@ impl SuggestionsEngine {
|
|||||||
return true;
|
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
|
false
|
||||||
|
|||||||
Reference in new issue
Block a user