Fix most popular track genre fetching (VA albums)

This commit is contained in:
J0J0 Todos 2025-01-09 22:20:58 +01:00
parent 1aca3989d7
commit 847b7260b4

View file

@ -472,9 +472,15 @@ class LastGenrePlugin(plugins.BeetsPlugin):
if not item_genre:
item_genre = self.fetch_artist_genre(item)
if item_genre:
item_genres.append(item_genre)
item_genres += item_genre
if item_genres:
new_genres, _ = plurality(item_genres)
most_popular, rank = plurality(item_genres)
new_genres = [most_popular]
self._log.debug(
'Most popular track genre "{}" ({}) for VA album.',
most_popular,
rank,
)
if new_genres:
return self._combine_and_label_genres(