diff --git a/xmpd-gui/src/components/song_list/mod.rs b/xmpd-gui/src/components/song_list/mod.rs index 02aa3a1..7f4a4f1 100644 --- a/xmpd-gui/src/components/song_list/mod.rs +++ b/xmpd-gui/src/components/song_list/mod.rs @@ -66,6 +66,7 @@ impl SongList { let should_display = match &query_type { SearchType::Normal | SearchType::Author | + SearchType::Genre | SearchType::Source if query_text.is_empty() => true, SearchType::Source => { @@ -83,6 +84,13 @@ impl SongList { .to_lowercase() .contains(&query_text) }, + SearchType::Genre => { + song.genres() + .iter() + .map(|v| v.to_lowercase().contains(&query_text)) + .collect::>() + .contains(&true) + }, }; if should_display {