I would like to know if there is a way to populate a tag based on a word or a string in another tag, either via regex or if statement.
eg. IF the ALBUM tag contains the word Soundtrack or the strings Best of or Greatest Hits, I would like to copy Soundtrack to the RELEASETYPE tag, or if ALBUM contains Best of or Greatest Hits populate RELEASETYPE with Best of / Greatest Hits Compilation Album, and if COMPILATION is checked, then populate RELEASETYPE with Various Artists Compilation, otherwise populate RELEASETYPE with Album.
You may create an action group with individual actions for each condition.
Use an action of the type "Format value" for the field RELEASETYPE with e.g. as
Format string: $if($eql(%compilation%,1),Various Artists Compilation,%releasetype%)
Or if a search string is only part of the total string:
Format string: "$ifgreater($strstr($upper(%album%),'BEST OF'),0,'Best of / Greatest Hits Compilation Album',%releasetype%)
These expression will hardly ever return a string as you compare an uppercase "BEST OF" with an ordinary "Best of" which will never match.
That is why I wrote
This applies to all expression where you use $upper().
Use Format value
Format string: %album% '['%releaseedition% %releasetype%']'
Well, you could transform both string parts with such a function:
$ifgreater($strstr($upper(%album%),$upper('Best of')),0,'Best of / Greatest Hits Compilation Album',%releasetype%)
But then again, you could write "Best of" in capitals straight away as "BEST OF" ... and that is what I did.
I don't understand.
Like that you will get hits only for strings where the ALBUM contains the string "Best of". You will not get hits for "Best Of" and "best of" - the $upper() plus the comparison with an all-capitals string makes it a sort of case-insensitive comparison.
Is there a test I can use to append FEATARTIST or ALBUMFEATARTIST to ARTIST or ALBUMARTIST with feat. preceding the FEATARTIST/ALBUMFEATARTIST if the former is not null?
ARTIST <== %ARTIST%$if(%FEATARTIST%,' feat. '%FEATARTIST%,)
... which means ...
If the tagfield FEATARTIST does exist by having some content in it, then append the content from FEATARTIST, else append nothing, to the tagfield ARTIST.
There is also an abbreviation ...
ARTIST <== %ARTIST%[' feat. '%FEATARTIST%]
Now, to expand on that. Is there a way to test if there is a ' feat. ...' string in the TITLE and ALBUM, then move that string (not copy) minus the ' feat. ' part, to the FEATARTIST and ALBUMFEATARTIST tags?