Set Version Tag to X if Album Title contains X

Trying to get my tags cleaned up for Roon and wanting to set a new Version tag if an album title contains stuff like (2009 Stereo Remaster) or (Japanese Edition)

I thought something like this
$if($eq_all(%album%,Japanese, Edition),$set(Version,Japanese Edition))

or this
$if($rsearch(%album%,Japanese Edition),$set(Version,Japanese Edition))

but neither work. A more elegant solution would be to take anything inside “(” to “)” and set it as Version.

Show some of the example albums you are trying to do this with. Usually the (2009 Stereo Remaster) or (Japanese Edition) is in the disambiguation text.

Try looking in the %_releasecomment% tag instead of %album%.

1 Like

Usinf $eq_all(%album%,Japanese, Edition) won’t work, that does an equality check. And actually this can’t be true, it would mean that %album% is at the same time exactly “Japanese” and " Edition".

The $rsearch approach should actually work, but depending on what you are looking see the comment of @IvanDobsky regarding %_releasecomment%. Maybe a simple

$if(%_releasecomment%,$set(Version,%_releasecomment%))

will do what you want.

I am also curious regarding the Version tag and Roon. Do you have details how Roon is using this and how it expects this to be technically stored in the tags? Roon is usually very sparse with information regarding its technical details, so I just wonder if this is something we should support better in Picard natively or with a plugin.

Note that, since Picard does not now about this tag, it will be stored as a TXXX:Version frame in ID3 and as VERSION in FLAC / Vorbis. It won’t be stored at all in MP4 and WMA.

2 Likes

This would be an example of an album Hudson Mohawke - Satin Panthers

I manually add the Edition or Remaster disambiguation on album titles in parenthesis after getting them tagged through Picard since most of my collection doesn’t have that disambiguation in there Musicbrainz data. I know on some of my collection I have the edition or version disambiguation in the comments but I also store bit depth and resolution in comments so I would have to use the same $rsearch function or have a function to remove other text then set version to the resulting comment tag. But thats alot more than I would like to change on my tags.

$rsearch does not work using $if($rsearch(%album%,Japanese Edition),$set(%Version%,Japanese Edition)) on an %album% that is Satin Panthers (Japanese Edition)

This is a place to start for understanding Roon tagging. Decoding Mapping of File Based Tags to Roon

Since you are editing them manually that means the data is not available when the script gets executed (which is directly after data gets loaded from MusicBrainz). What you can do however is a semi-automatic way with Run Scripts:

  1. Create a new script in Options Scripting with only the version setting script, name it e.g. “Set Version tag”
  2. After you have matched up your files for tagging and after you have manually added edited the album title select all files, right click and select “Run Script” > “Set Version tag”
  3. Now all your files should have the Version tag set from the album title and you can save

Also here is a more universal version of your script which looks at everything in parenthesis at the end of the album title:

$set(Version,$rsearch(%album%,\\\(\(.*?\)\\\)\$))

All th escaping with \ needed here makes this a bit hard to read, but the actual regular expression used here is \((.*?)\)$. But \, (, ) and $ are all special characters in Picards scripting and need an additional \ added in front.

2 Likes

that’s exactly the solution I was going for. I was already trying it the Run Script way. Thanks. Unfortunately I’m realizing that I have albums that have multiple parenthesis like (instrumentals) (Japanese Edition). So I’m going to have to just have specific searches through “or” functions.

Now I need to go into the Roon forums to try and get support for the Media Tag and Release Type. That way Editions and Remasters can have there own tag in Version and media tags like DVD Audio, SACD" and release type “EP, Single, Album” can be read displayed in Credits

1 Like