I would like to create a couple of actions that function according to the file type they're used for, so that I don't have to select between multiple actions for flac, mp3 or mp4 every time. Hopefully that's possible.
I was looking at Boolean functions in Help but I can't exactly figure out how to configure them, so I would really appreciate if someone could give me an example.
Specifically I would like like to use "Remove fields except" actions that would remove different fields for FLAC and mp3 files. I would prefer an action group with seperate actions for each file type, so I can easily add other types in the future. For example something like this:
Action Group:
action 1: if selected file's extension is .mp3, remove fields except field1;field2;field3, otherwise do nothing
action 2: if selected file's extension is .flac, remove fields except field1;field2, otherwise do nothing
The remove fields except action does not support Scripting functions. The best you can do is use separate actions like you describe.
Or you can set up one action group like the following:
Begin Action Group _Script Test#TEST REMOVE EXCEPT fields in flac, mp3 + mp4
Action #1Actiontype 5: Format valueField ______: REMIXERFormatstring: $if($eql(%_extension%,mp3),,%remixer%)Action #2Actiontype 5: Format valueField ______: YEARFormatstring: $if($eql(%_extension%,mp3),,%year%)Action #3Actiontype 5: Format valueField ______: UNSYNCEDLYRICSFormatstring: $if($eql(%_extension%,flac),,%unsyncedlyrics%)Action #4Actiontype 5: Format valueField ______: COMMENTFormatstring: $if($eql(%_extension%,flac),,%comment%)
End Action Group _Script Test#TEST REMOVE EXCEPT fields in flac, mp3 + mp4 (4 Actions)
Action #1 will remove REMIXER field if the extention is mp3
Action #2 will remove YEAR field if the extention is mp3 Action #3 will remove UNSYNCEDLYRICS field if the extention is flac
Action #4 will remove COMMENT field if the extention is flac
Brilliant, thanks.
Just one questions, though. What will the z values in those three functions do (%track%, %track% and %tracktotal%) if x values are not true (wrong extension)? Shouldn't the z values be empty?
You want to keep whatever is existing in that field regardless if you want the same actions in the one group. The z value corresponding to the format value keeps what's existing in that field (whether empty or filled).
Action #1 will take care of TRACK if it's an mp3
Action #2 will take care of TRACK if it's flac
It all works itself out when you run the single action.