Preserve specific tags only for specific track

Is it possible to preserve only one tag of a specific track?
For example I want the track number 5 of the album “xy” not to be updated with the one in musicbrainz, but all the others of the album (or all the other albums) to be updated

1 Like

You’ll need some way to remember. As Picard does not maintain persistent data about the file it handles you’d need to put that info into the file’s tags itself. I had used some custom tag for this in the past to preserve the disambiguation in album title for a few selected albums. I don’t have my solution from the past, but I came up with the following that should help you:

  1. Add a new script in Options > Scripts, give it some nice name, e.g. “Keep preserved tags”, and set the following script:

    $foreach(%preserved_tags%,$unset(%_loop_value%))
    

    Make sure you mark this script as active (the checkbox must be checked) so it runs automatically when releases get loaded and files get matched to them

  2. Now whenever you have a file where you change a tag manually and don’t want Picard to update it later, add or edit a tag called preserved_tags to the file. Add the name of the tags you want to preserve as separate values. E.g. the following would preserve the tags releasecountry and catalognumber in this file:

    Bildschirmfoto vom 2023-01-26 16-52-03

  3. Save the file. The next time you load it into Picard and the data from MB gets loaded the file should still show the data from the file.

  4. Should you decide to not preserve a tag anymore, remove it from preserved_tags and reload the release.

Note that preserved_tags is just an arbitrary name I chose. You can use a different name if you want, just make sure to update it in the script.

This approach works only for file formats where Picard can store freeform tags (which are most, except for ASF / WMA).

7 Likes

It works!
Thanks :grinning:

3 Likes