I have a FORMAT statement that cuts lengthy titles to a maximum length at the closest word break, but only if the title is too long (i.e., I don't want to slowly eat away at the title each time I run the action). Action #1 below works just fine for this, but not if it comes after Action #0.
Here's the Action Group = test.mta
[#0]
T=5
F=TITLE
1=$if($eql(%album%,'Any Other Album'),$regexp(%title%,'\\d+',),%title%)
[#1]
T=5
F=TITLE
1=$if($eql(%album%,'The John Batchelor Show'),$if($grtr($len(%title%),20),$regexp($left(%title%,20),'\\s[^\\s]*$',),%title%),%title%)
#1 stops working in the above .mta, but if you change \\d+ to \\d in #0 then #1 works just fine. Alternately you can flip the order of #1 and #0 and #1 will work.
The syntax of #0 and #1 are both correct, and work fine when used alone. Together #0 breaks #1.
This was tested with a fresh install of the latest version of Mp3tag.
$regexp(%TITLE%,'\d+',)"This is 1 test of 99 tests in 123 files." ->"This is test of tests in files."
This works fine ...
$if($grtr($len(%TITLE%),20),$regexp($left(%TITLE%,20),'\s[^\s]*$',),%TITLE%)$ifgreater($len(%TITLE%),20,$regexp($left(%TITLE%,20),'\s[^\s]*$',),%TITLE%)"This is 1 test of 123 tests in 99 files" ->"This is 1 test of"
Which meaning does the if-clauses have?
$if($eql(%ALBUM%,'Any Other Album'),...$if($eql(%ALBUM%,'The John Batchelor Show'),...
What does this mean in practice?
"#1 stops working in the above .mta"
This works fine ...
Begin Action Group 20150803.Test.rkoAction #1Actiontype 5: Format valueField ______: TITLEFormatstring:$if($eql(%ALBUM%,'Any Other Album'),$regexp(%TITLE%,'\d+',),%TITLE%)Action #2Actiontype 5: Format valueField ______: TITLEFormatstring:$if($eql(%ALBUM%,'The John Batchelor Show'),$ifgreater($len(%TITLE%),20,$regexp($left(%TITLE%,20),'\s[^\s]*$',),%TITLE%),%TITLE%)End Action Group 20150803.Test.rko(2Actions)File 1:ALBUM='Any Other Album'TITLE= ..."This is 1 test of 99 tests in 123 files." ->"This is test of tests in files."File 2:ALBUM='The John Batchelor Show'TITLE= ..."This is 1 test of 99 tests in 123 files." ->"This is 1 test of"File 3:ALBUM='Album'TITLE= ..."This is 1 test of 99 tests in 123 files." ->"This is 1 test of 99 tests in 123 files."
The results are always the same regardless of any order of the three files.
There is no justification for a bug report.
The MTA file ...
[#0]
T=5
F=TITLE
1=$if($eql(%ALBUM%,'Any Other Album'),$regexp(%TITLE%,'\\d+',),%TITLE%)
[#1]
T=5
F=TITLE
1=$if($eql(%ALBUM%,'The John Batchelor Show'),$ifgreater($len(%TITLE%),20,$regexp($left(%TITLE%,20),'\\s[^\\s]*$',),%TITLE%),%TITLE%)
Action "Format value"Tag-Field ..: TESTFormatstring:$if($grtr($len('1234'),3),'is greater','is not greater')==>'is greater'... or ...Formatstring:$if($grtr($len('1234'),4),'is greater','is not greater')==>'is not greater'... or ...Formatstring:$ifgreater($len('1234'),3,'is greater','is not greater')==>'is greater'... or ...Formatstring:$ifgreater($len('1234'),4,'is greater','is not greater')==>'is not greater'