Only set a single tag in Picard (complete $unset tag list)

This has come up a few times over the years, that MusicBrainz Picard doesn’t have a way to ‘only tag X’, e.g. ‘only tag genre and nothing else’.

In the meantime, here’s a list that you can paste into Picard > Options > Scripting that will stop any standard MusicBrainz/Picard tag from being overwritten, for future reference.

Remove the relevant line from the script for the tag/s you would like to change:

$unset(album)
$unset(albumartist)
$unset(albumartistsort)
$unset(albumsort)
$unset(arranger)
$unset(artist)
$unset(artistsort)
$unset(artists)
$unset(bpm)
$unset(comment:*)
$unset(compilation)
$unset(composer)
$unset(composersort)
$unset(conductor)
$unset(copyright)
$unset(originaldate)
$unset(originalyear)
$unset(date)
$unset(discnumber)
$unset(director)
$unset(totaldiscs)
$unset(encodedby)
$unset(encodersettings)
$unset(engineer)
$unset(genre)
$unset(grouping)
$unset(key)
$unset(isrc)
$unset(label)
$unset(language)
$unset(lyricist)
$unset(lyrics:*)
$unset(media)
$unset(mixer)
$unset(djmixer)
$unset(remixer)
$unset(mood)
$unset(originalalbum)
$unset(originalartist)
$unset(performer:*)
$unset(podcast)
$unset(podcasturl)
$unset(producer)
$unset(discsubtitle)
$unset(subtitle)
$unset(title)
$unset(titlesort)
$unset(tracknumber)
$unset(totaltracks)
$unset(work)
$unset(website)
$unset(license)
$unset(acoustid_id)
$unset(acoustid_fingerprint)
$unset(asin)
$unset(barcode)
$unset(catalognumber)
$unset(discid)
$unset(gapless)
$unset(musicbrainz_artistid)
$unset(musicbrainz_discid)
$unset(musicbrainz_originalalbumid)
$unset(musicbrainz_originalartistid)
$unset(musicbrainz_recordingid)
$unset(musicbrainz_albumid)
$unset(musicbrainz_albumartistid)
$unset(musicbrainz_releasegroupid)
$unset(musicbrainz_releasetrackid)
$unset(musicbrainz_trackid)
$unset(musicbrainz_trmid)
$unset(musicbrainz_workid)
$unset(musicip_puid)
$unset(musicip_fingerprint)
$unset(releasecountry)
$unset(releasestatus)
$unset(releasetype)
$unset(script)
$unset(show)
$unset(showsort)
$unset(writer)

Notes:

  • If you’re going to the effort of matching things in Picard, I highly recommend leaving the MBID tags (all the musicbrainz_*id tags). You probably won’t regret having them - you will regret not having them if you want to make changes in the future.
  • In Options > Tags don’t tick ‘clear existing tags’ if you don’t want tags wiped.
  • If you’re going to all this effort to protect some valuable tags, take a second to test what you’re doing on some backup files, or cry later.
  • If you want to remove tags completely, instead of not overwrite them, replace $unset with $delete.
  • Thanks to @hiccup whose great list I found out half way through this and then ended up pasting here with only minor edits :smiling_face_with_three_hearts:
6 Likes

Are you sure? Isn’t the plugin $keep “Keep tags” exactly doing this?

Adds a $keep() function to delete all tags except the ones that you want. Tags beginning with musicbrainz_ are kept automatically, as are tags beginning with _ .

2 Likes

Honestly, trying to make some tutorial videos for Picard has mainly just shown me how little I know about Picard :sweat_smile:

(Been happy with my basic tagging settings for a veeerry long time now…)

I’ve been struggling to make this work - should it be as simple as putting something like ‘$keep(artist)’ in a tagger script? It keeps wiping everything (while $unset works)

Edit: Oh, I should have read the description, I just assumed it’s the same because of your reply. I think that $keep is meant to delete everything except what’s selected, whereas with $unset what I want to do is not have the other tags be touched at all :ok_hand:
If there’s a better way to do this I would love to know, the long list is unwieldy…

2 Likes

Yep, with the $keep-command you keep the tags you list in (), like $keep(genre,title,artist,album,tracknumber). Everything not listed in brackets will be deleted. This way you have more control what to keep and a much shorter list to maintain :wink:

Maybe I missunderstood your

only tag genre and nothing else.

You like to get something as “Only write new or update GENRE and don’t touch anything else, whatever this could be unless I specifically unset it”?

Example:
If you forget to $unset a tag like ACOUSTID_FINGERPRINT it will be written into your files*.
Otherwise, everything not written in $keep() will be deleted. Even if some day a new tag would be invented.

* don’t worry, it will not be written automatically into your files :blush: - it’s just an example.

2 Likes

Correct :ok_hand:

A common request in my experience!

I agree.

Just one thing:
How do you make sure that you don’t left any unwanted tags in your files?
Tags from sources like iTunes (like all the ITUNESblabla)?
Tags from vendors who wants to left their WWWblabla-advertising tags in your files?

1 Like

Is that something you need?
I guess you could add in $delete(tag/s) to get rid of ITUNESblabla and so on.

If you’re asking me a question about how I use this $unset list for tagging/cleaning up my files in that situation - I don’t :stuck_out_tongue:
It’s usually casual users who are only after cover art or genres, etc, asking this question (I use Picard to retag everything).