From 5b50798ba07dd7274b31a9262133c720c4550f22 Mon Sep 17 00:00:00 2001 From: Rakim Middya <103818757+rakim-0@users.noreply.github.com> Date: Wed, 6 Nov 2024 17:45:59 +0530 Subject: [PATCH] removing unneeded config variables --- picard/track.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/picard/track.py b/picard/track.py index be48bc4c89..1e4f6197e6 100644 --- a/picard/track.py +++ b/picard/track.py @@ -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 @@ -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):