Recently I've run into an issue where Record Labels are something like:
Label1 / Label2 / Label3
Label1 / Label2
The player I'm using reads those as one Record label even if I swap those "/" for commas or semicolons (which sucks)
With some scripting I changed those values listed above to these:
Label1\\Label2\\Label3
Label1\\Label2
With this the player reads each record label properly.
I've run into an issue though where I'm not sure how to safely script for multi value fields.
Ex: $IF(%SUM TING%,T,%LABEL%)
Here in the False clause a regular "Label" field would remain "as is" but when the field has multiple values any subsequent values after the first entry listed in the "extended tags" window are quickly thrown into the shadow realm never to be seen again. Is there a way to combat this in scripting?
For a bit more context on how I chose to approach this action sequence:
Using replace I changed all " / " to "/" to remove unwanted spaces in Record Labels
Using Guess I created two guesses for either 2 or 3 Record Labels, Each Record Label is placed into a throw away field BIN BIN1 or BIN2
Format Value: IF BIN2 exists then there must be 3 Labels so the field will be BIN\\BIN1\\BIN2 IF BIN2 does not exist but BIN1 does then there must be 2 Labels, the field will be BIN\\BIN1 & IF BIN1 does not exist then there must only be 1 label, in that case the field will be "whatever the field already is"
If you want to get all the data as a single string, use
$meta_sep() with a suitable, unique separator.
To transform that string back to multi-value fields, use \\ as separator.
Not dumb at all. I've wanted to slap myself in the head after reading this because I've used $meta_sep() for fields in Mp3tag in the past but never thought of using it in actions.
I actually abandoned an action I had envisioned a while ago because it deleted multi-value tags during testing.
Now I can safely use it, so your post was definitely helpful to me.
I dislike having different versions of the "albumartist" tag in my files, but I also don't like deleting information if it's not already present in the desired form.
This action keeps the ALBUMARTIST if it is present and deletes ALBUM ARTIST and ALBUM_ARTIST tags.
Or if ALBUMARTIST is not present, but either ALBUM ARTIST or ALBUM_ARTIST is (in this order), it will set ALBUMARTIST to the contents of ALBUM ARTIST or ALBUM_ARTIST and once again deletes these 2 tags.
That way I can be sure that if there was information about the albumartist present in the source file, it will end up in the ALBUMARTIST tag and the undesired tags will be gone.
This approach is still not free of risk. If for example the ALBUMARTIST tag contains garbage and the actual information is in ALBUM ARTIST, it would be deleted and the garbage kept, but that's unlikely enough that I chose to ignore such cases. It's only a convenience action to tidy up tags before I take a look and fix things up after all.
This is an interesting use case as i dont often see these different tags for Album Artist. I've honestly tried avoiding multivalue tags for the same reason. I made an action & in testing it deleting info so I stuck to fields with delimiters instead. Im glad my blunder could shed light for someone.
I actually only just realized I could use scripting functions in the display colums. I just never even though to try it until learning how to use $meta_sep.