mirror of
https://github.com/beetbox/beets.git
synced 2026-02-12 02:12:10 +01:00
Fix most popular track genre fetching (VA albums)
This commit is contained in:
parent
1aca3989d7
commit
847b7260b4
1 changed files with 8 additions and 2 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in a new issue