How to preserve all but one or two specific tags


#1

I’m new to MusicBrainz Picard.

I was wondering how one would go about preserving all tags (i.e. leaving previously blank tags blank) with the exception of the %album% and %tracknumber% tags.

Would a script do this or would it require something else? Thanks in advance.


I would like to contribute, but I am completely lost
#2

In Options > Tags you can enter tags Picard should not overwrite (“Preserve these tags from being cleared or overwritten with MusicBrainz data”). Not quite sure right now whether it will leave blank tags blank, maybe just try it. For a list of tags see http://picard.musicbrainz.org/docs/tags/

I would strongly recommend you to also write the musicbrainz_recordingid and musicbrainz_albumid to the files and not put them on the preserve list. Those tags in the files will enable you to easily retag your files with Picard without having to match them again to the correct album / track.


Update music library's genre without touching title and artists
#3

No, the preserve tags function will still overwrite blank tags. If nothing else, I think you can unset everything else in scripts, but I feel like there’s an easier way. I can’t test right now, but will later.


#4

It was the $keep function that you can add as a plugin that I was thinking of: https://picard.musicbrainz.org/plugins/

So with that, instead of trying to unset everything you don’t want, you can give it a list of tags that you want to keep and it will get rid of the rest.


#5

Nice function!

[quote=“psychoadept, post:4, topic:118370”]It was the $keep function[/quote]Please keep in mind, that this function does NOT delete any of the musicbrainz tags nor tags starting with a _


#6

Can anyone provide me please with the syntax to the $keep() function?
Plugin author adds in description “delete all tags except the ones that you want”. Lil’ confused here…


#7

If you want to delete ALL (other) tags inside your files but not this specific 4, you can use
$keep(title,artist,album,tracknumber)
This example will delete every tag excepting “title”, “artist”, “album” or “tracknumber”.

It is most helpful if you have many unwanted or unknown tags inside your files and you know exactly which one you really want to keep.


#8

Oh great. So, there can be as many arguments/fields as one wants.
Thanks for the speedy response :slight_smile: