mirror of
https://github.com/beetbox/beets.git
synced 2026-01-02 22:12:53 +01:00
lastgenre: Catch NoneType errors in _fitler_valid_genres
This commit is contained in:
parent
702ddf493e
commit
f4d22a83b5
1 changed files with 2 additions and 0 deletions
|
|
@ -254,6 +254,8 @@ class LastGenrePlugin(plugins.BeetsPlugin):
|
|||
|
||||
def _filter_valid_genres(self, genres: list[str]) -> list[str]:
|
||||
"""Filter list of genres, only keep valid."""
|
||||
if not genres:
|
||||
return []
|
||||
return [x for x in genres if self._is_valid(x)]
|
||||
|
||||
def _is_valid(self, genre: str) -> bool:
|
||||
|
|
|
|||
Loading…
Reference in a new issue