Skip to content

Commit

Permalink
removing unneeded config variables
Browse files Browse the repository at this point in the history
  • Loading branch information
rakim0 committed Nov 6, 2024
1 parent c82f01c commit 5b50798
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions picard/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,8 @@ def _customize_metadata(self):
tm['~silence'] = '1'

if config.setting['use_genres']:
config = get_config()
self._add_folksonomy_tags(config)
self._add_genres(config)
self._add_folksonomy_tags()
self._add_genres()
self._convert_folksonomy_tags_to_genre()

# Convert Unicode punctuation
Expand Down Expand Up @@ -375,19 +374,18 @@ def _convert_folksonomy_tags_to_genre(self):
join_with=config.setting['join_genres']
)

def _add_tags(self, tags, name, config=None):
config = config or get_config()
def _add_tags(self, tags, name):
self.metadata[name] = tags.keys()

def _add_folksonomy_tags(self, config=None):
def _add_folksonomy_tags(self):
tags = Counter(self._folksonomy_tags)
tags += self.album._folksonomy_tags
self._add_tags(tags, '_folksonomy_tags', config)
self._add_tags(tags, '_folksonomy_tags')

def _add_genres(self, config=None):
def _add_genres(self):
genre = Counter(self._genres)
genre += self.album._genres
self._add_tags(genre, '_genres', config)
self._add_tags(genre, '_genres')


class NonAlbumTrack(Track):
Expand Down

0 comments on commit 5b50798

Please sign in to comment.