Skip to content

Commit

Permalink
Add function to remove genres from tags
Browse files Browse the repository at this point in the history
This function would remove the tags that are present in genre.
  • Loading branch information
rakim0 committed Nov 15, 2024
1 parent 5b50798 commit 58286b7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion picard/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,10 @@ def _customize_metadata(self):
tm['~silence'] = '1'

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

# Convert Unicode punctuation
if config.setting['convert_punctuation']:
Expand Down Expand Up @@ -387,6 +388,10 @@ def _add_genres(self):
genre += self.album._genres
self._add_tags(genre, '_genres')

def _delete_genres_from_tags(self):
for genres in self.album.genres:
del self.album._folksonomy_tags[genres]


class NonAlbumTrack(Track):

Expand Down

0 comments on commit 58286b7

Please sign in to comment.