Skip to content

Commit

Permalink
lastgenre: some linting/formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
JOJ0 committed Oct 31, 2024
1 parent 3ff7075 commit a56098f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions beetsplug/lastgenre/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,18 +376,18 @@ def _get_genre(self, obj):
genres = self._get_existing_genres(obj, separator)
# Case 3 - Keep WHITELISTED. Combine with new.
# Case 1 - Keep None. Overwrite all.
if self.config['keep_allowed']:
if self.config["keep_allowed"]:
keep_genres = self._dedup_genres(genres, whitelist_only=True)
else:
keep_genres = None
else:
genres = self._get_existing_genres(obj, separator)
# Case 4 - Keep WHITELISTED. Handle empty.
# Case 2 - Keep ANY. Handle empty.
if genres and self.config['keep_allowed']:
if genres and self.config["keep_allowed"]:
keep_genres = self._dedup_genres(genres, whitelist_only=True)
return separator.join(keep_genres), "keep allowed"
elif genres and not self.config['keep_allowed']:
elif genres and not self.config["keep_allowed"]:
keep_genres = self._dedup_genres(genres)
return separator.join(keep_genres), "keep any"
# else: Move on, genre tag is empty.
Expand Down

0 comments on commit a56098f

Please sign in to comment.