Skip to content

Commit

Permalink
Handle dups of existing genres in lastgenre plugin
Browse files Browse the repository at this point in the history
When handling existing comma-separated genres in the _get_genre method
of the plugin, make sure duplicate genres are removed.
  • Loading branch information
JOJ0 committed Oct 29, 2023
1 parent 29ede92 commit 7c5d0ad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions beetsplug/lastgenre/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ def _get_genre(self, obj):
if allowed:
keep_allowed.append(g)
if keep_allowed:
keep_allowed = set(keep_allowed)
return ", ".join(keep_allowed), "keep"

# Track genre (for Items only).
Expand Down

0 comments on commit 7c5d0ad

Please sign in to comment.