mirror of
https://github.com/beetbox/beets.git
synced 2026-01-19 14:45:17 +01:00
Include lower-casing in _get_existing already
since we don't use it for early-returning no-force-existing genres anymore.
This commit is contained in:
parent
8da98e52ee
commit
d5cf376a51
1 changed files with 4 additions and 3 deletions
|
|
@ -303,7 +303,9 @@ class LastGenrePlugin(plugins.BeetsPlugin):
|
|||
else:
|
||||
genre_str = obj.get("genre")
|
||||
|
||||
return genre_str.split(self.config["separator"].get())
|
||||
return [
|
||||
g.lower() for g in genre_str.split(self.config["separator"].get())
|
||||
]
|
||||
|
||||
def _combine_genres(
|
||||
self, old: list[str], new: list[str]
|
||||
|
|
@ -344,11 +346,10 @@ class LastGenrePlugin(plugins.BeetsPlugin):
|
|||
return obj.get("genre"), "keep, no-force"
|
||||
|
||||
if self.config["force"]:
|
||||
genres = self._get_existing_genres(obj)
|
||||
# Force doesn't keep any unless keep_existing is set.
|
||||
# Whitelist validation is handled in _resolve_genres.
|
||||
if self.config["keep_existing"]:
|
||||
keep_genres = [g.lower() for g in genres]
|
||||
keep_genres = self._get_existing_genres(obj)
|
||||
|
||||
# Run through stages: track, album, artist,
|
||||
# album artist, or most popular track genre.
|
||||
|
|
|
|||
Loading…
Reference in a new issue