Skip to content

Commit

Permalink
Check 'folksonomy_tag' setting and fill genre
Browse files Browse the repository at this point in the history
The check has been moved here from picard/mbjson.py as we are
loading _genres and _folksonomy_tags regardless of user setting.
Thus for filling in the actual genre tag, we are checking the user
preference.
  • Loading branch information
rakim-0 committed Oct 19, 2024
1 parent a05a1e8 commit 2785839
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions picard/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,13 @@ def _genres_to_metadata(genres, limit=None, minusage=0, filters='', join_with=No

def _convert_folksonomy_tags_to_genre(self):
config = get_config()
# Combine release and track genres
genres = Counter(self.genres)
genres += self.album.genres
use_folksonomy = config.setting['folksonomy_tags']
if use_folksonomy:
genres += self.album._folksonomy_tags
else:
genres += self.album._genres
# Combine release and track genres
if self.album.release_group:
genres += self.album.release_group.genres
if not genres and config.setting['artists_genres']:
Expand Down

0 comments on commit 2785839

Please sign in to comment.