Don't list genres with zero valid albums (ie. all songs in this genre have no artist / no album tag)

This commit is contained in:
Antoine Gersant 2025-02-03 01:50:06 -08:00
parent 6862cff185
commit 809e3f878d

View file

@ -203,7 +203,8 @@ impl Collection {
let mut genres = self
.genres
.values()
.map(|a| make_genre_header(a, dictionary))
.filter(|g| !g.albums.is_empty())
.map(|g| make_genre_header(g, dictionary))
.collect::<Vec<_>>();
let collator = dictionary::make_collator();
genres.sort_by(|a, b| collator.compare(&a.name, &b.name));