Genre whitelist

Instead of using a white list and an ignore list, i’d rather have one config option for both:

Strict matching:

+rock
-disco

Wildcards:

+*jazz*
-*

In this case, it would accept any genre containing jazz, ignore anything else.

Or:

 -*jazz*
 +*

Which would be equivalent to:

-*jazz*

Meaning: allow everything, but ignore genres containing jazz.

It could even support regexps:

+/^jazz/
-/^.*disco$/

Not sure whether it should be a separate file or just a normal option stored in usual config ini (perhaps with possibility to import/export to text file).

If the idea is to filter out tags/genres that are embedded into files, it has to allow whatever user wants, and cover as much cases as possible.

The current option ignore_genres, in this regard, was badly designed.

Code: https://github.com/metabrainz/picard/blob/81bc3697532f23dc879de7bb051e854b06fac8d1/picard/track.py#L208-L254

@ZoeB: please create a ticket for this if none exists already and link it here.

3 Likes