Create an action of the type "Format value" or "Convert>Tag-Tag" for NEW TAG
Format string: $replace(%engineer%,;, - engineer;) - engineer; $replace(%mastering%,;, - mastering;) - mastering; $replace(%assistant mixer%,;, - assistant mixer;) - assistant mixer
I would also like to build the script based on a set of standard tags and, when I execute the action, only the tags present in that specific file are written in the new tag (example: in the script there is %assistant mixer% and %mastering%, but in the specific file there is only %mastering%, the new tag will only have the value Name - mastering and nothing else)
I do not think the I did not consider the multi-value tags but that you did not mention them in the first place. So it is the GIGO principle - garbage in, garbage out.
Replace the reference to the tag field with $meta_sep(tagfieldname,; ) to get the multi-value fields into a single string.
I would then split the single action into several actions in that action group - 1 for each field that could be there or not - an then enclose the $replace() statement into $if2(), e.g. %new tag%$if2(%mastering%,$replace($meta_sep(mastering%,; ),;, - mastering;),)
Or you create multi-value fields again for %new tag% with %new tag%\\$if2(%mastering%,$replace($meta_sep(mastering%,; ),;, - mastering\\),)
I do not think the I did not consider the multi-value tags but that you did not mention them in the first place. So it is the GIGO principle - garbage in, garbage out.
Sorry, that was a translation error. I didn't mean that you didn't consider the multi-value tag, but that the function as it was written seemed not to consider multi-value tags.
As soon as I get home I'll try this.
In the meantime, thanks
You should consider, that the custom tag field "New Tag" you provided, actually seems to correspond to the official tag field "INVOLVEDPEOPLE". However, this has an opposite rule for how it is filled with data, e.g. engineer:Name A;
Hi,
actually the final tag will be called PERSONNEL used by Roon and the format is Name - Role.
My intent is to write in PERSONNEL all the single tags that I already have in the files by getting the role and attribute from musicbrainz (mastering, remastering, assistant , additional, co-, sound engineer, artwork, design...), with the correct "role" string for Roon
if you want to use several tags of the type NEW TAG then you would have to join the field to become a single field with $meta_sep(new tag,\\) before you can add further data. Otherwise only the first instance of the field is taken.
I still have the problem that it doesn't add the role string to the end of the last tag value. I've tried several times to change it but without success