Hi @zimjo and thanks for this useful component.
In my case, it doesn't seem to handle well large titleformatting strings. Makes foobar crash instantly 100% of the time.
Steps to reproduce :
1. Tasks > TItleformatting Scripts > Paste a large titleformatting string (in my case it's a string that I use for many other purposes so it's tested and it should work)
$if(%danse%,'Danse - '$if($strcmp($meta(danse,0),WCS),WCS,$if($strcmp($meta(danse,0),Rock),Rock,$if(%danse%,Autres,ERREUR))),Ecoute)\[$if($and($strstr(%genre%,Comédie),$strcmp($left($meta(album artist),6),Troupe)),%genre%,$if($strstr(%sorting%,'[Coffret]'),$if($strstr(%sorting%,'=='),$left(%sorting%,$sub($strstr(%sorting%,'=='),1)),),$if($and($strstr(%album artist%,Compilation),$not($strstr($left(%sorting%,3),OST))),,[$replace(%sorting%,'==','\')])))\]$if($strstr($left(%sorting%,3),OST),$if($strstr(%sorting%,'=='),'('[$left(%original release date%,4)-]$left(%date%,4)') '$replace($if2('[Single] '$replace(%single%,'?','_'),$replace(%album%,'?','_')[' ['%edition%']'][' ('$if($strcmp($strchr(1234567890,$left(%discnumber%,1)),0),,'CD ')%discnumber%')']),'Remaster',RM,'MFSL Original Master Recording',MFSL),$puts(d,$if2('[Single] '$replace(%single%,'?','_'),$replace(%album%,'?','_')))$puts(e,1)$puts(f,$sub($strstr($get(d), OST),1))$puts(g,$substr($get(d),$get(e),$get(f)))$if($strcmp($left($get(d),2),L''),$ascii($upper($substr($get(d),3,3)))$substr($get(d),4,$get(f))' (L'''')',$if($and($strcmp($left($get(d),2),A ),$or($and($or($strstr(%language%,Anglais),$strstr(%language%,Allemand),$strstr(%language%,Instrumental)),$not($strstr(%genre%,Chanson))),$and($strstr(%language%,Espagnol),$strstr(%genre%,Pop)),$strstr(%genre%,Divers))),$ascii($upper($substr($get(d),3,3)))$substr($get(d),4,$get(f))' (A)',$put(c,$replace($put(b,$cut($get(g),$put(a,$strchr($get(d), )))),The ,,Le ,,Les ,,Des ,,La ,,Las ,,Lo ,,Los ,,An ,,At ,)$substr($get(d),$add($get(a),1),$get(f)))$iflonger($get(g),$len($get(c)),' ('$trim($get(b))')',)))$substr($get(d),$add($get(f),1),999)[' ['$replace(%edition%,Remaster,RM,MFSL Original Master Recording,MFSL)']'][' ('$if($strcmp($strchr(1234567890,$left(%discnumber%,1)),0),,'CD ')%discnumber%')']' ('[$left(%original release date%,4)-]$left(%date%,4)')'),$if($strstr(%album artist%,Compilation),Compilation\$if(%sorting%,$if($strstr(%sorting%,'[Coffret]'),$substr(%sorting%,$add($strstr(%sorting%,']'),2),$len(%sorting%))' ('%totaldiscs% CDs') ('%date%')'\['['%discnumber%'] ']$replace(%album%,'?','_')[' ['%edition%']'],%sorting%\'('[$left(%original release date%,4)-]$left(%date%,4)') '$replace($replace(%album%,'?','_')[' ['%edition%']'][' ('$if($strcmp($strchr(1234567890,$left(%discnumber%,1)),0),,'CD ')%discnumber%')'],'Remaster',RM,'MFSL Original Master Recording',MFSL)),$puts(d,$replace(%album%,'?','_'))$puts(e,1)$puts(f,999)$if($strcmp($left($get(d),2),L''),$ascii($upper($substr($get(d),3,3)))$substr($get(d),4,$get(f))' (L'''')',$if($and($strcmp($left($get(d),2),A ),$or($and($or($strstr(%language%,Anglais),$strstr(%language%,Allemand),$strstr(%language%,Instrumental)),$not($strstr(%genre%,Chanson))),$and($strstr(%language%,Espagnol),$strstr(%genre%,Pop)),$strstr(%genre%,Divers))),$ascii($upper($substr($get(d),3,3)))$substr($get(d),4,$get(f))' (A)',$put(c,$replace($put(b,$cut($get(d),$put(a,$strchr($get(d), )))),The ,,Le ,,Les ,,Des ,,La ,,Las ,,Lo ,,Los ,,An ,,At ,)$substr($get(d),$add($get(a),1),999))$iflonger($get(d),$len($get(c)),' ('$trim($get(b))')',)))[' ['$replace(%edition%,Remaster,RM,MFSL Original Master Recording,MFSL)']'][' ('$if($strcmp($strchr(1234567890,$left(%discnumber%,1)),0),,'CD ')%discnumber%')']' ('[$left(%original release date%,4)-]$left(%date%,4)')'),$if($and($strstr(%genre%,Comédie),$strcmp($left($meta(album artist),6),Troupe)),%subgenre%,$puts(d,$if2($meta_sep(album artist,', ',' & '),$if($strstr(%sorting%,Classique),$replace($meta_sep(composer,', ',' & '),Wolfgang Amadeus,W.A.,Johann Sebastian,J.S.,Ludwig Van,L.V.),$if2(%artist2%,$if2($meta_sep(artist,', ',' & '),$replace($meta_sep(composer,', ',' & '),Wolfgang Amadeus,W.A.,Johann Sebastian,J.S.,Ludwig Van,L.V.))))))$puts(e,1)$puts(f,$if($strstr($get(d),' ('),$sub($strstr($get(d),' ('),1),999))$puts(g,$substr($get(d),$get(e),$get(f)))$if($strcmp($left($get(d),2),L''),$ascii($upper($substr($get(d),3,3)))$substr($get(d),4,$get(f))' (L'''')',$if($and($strcmp($left($get(d),2),A ),$or($and($or($strstr(%language%,Anglais),$strstr(%language%,Allemand),$strstr(%language%,Instrumental)),$not($strstr(%genre%,Chanson))),$and($strstr(%language%,Espagnol),$strstr(%genre%,Pop)),$strstr(%genre%,Divers))),$ascii($upper($substr($get(d),3,3)))$substr($get(d),4,$get(f))' (A)',$put(c,$replace($put(b,$cut($get(g),$put(a,$strchr($get(d), )))),The ,,Le ,,Les ,,Des ,,La ,,Las ,,Lo ,,Los ,,An ,,At ,)$substr($get(d),$add($get(a),1),$get(f)))$iflonger($get(g),$len($get(c)),' ('$trim($get(b))')',))))\$if($strstr(%sorting%,'[Coffret]'),'('%date%') '$substr(%sorting%,$add($strstr(%sorting%,']'),2),$len(%sorting%))' ('%totaldiscs% CDs')'\['['%discnumber%'] ']$replace(%album%,'?','_')[' ['%edition%']'],'('[$left(%original release date%,4)-]$left(%date%,4)') '$replace($if2('[Single] '$replace(%single%,'?','_'),$replace(%album%,'?','_')[' ['%edition%']'][' ('$if($strcmp($strchr(1234567890,$left(%discnumber%,1)),0),,'CD ')%discnumber%')']),'Remaster',RM,'MFSL Original Master Recording',MFSL))))\%tracknumber% - $if($strcmp($len($meta(works)),0),,$if($strstr(%works%,'[]'),$puts(v,$replace(%works%,'[]',))$puts(w,$substr($get(v),$if($strstr(%works%,'=='),$add($strstr($get(v),'=='),2),0),999))$if($strstr(%works%,'[]'),['['$get(w)'] '],[$get(w)' - ']),))$replace(%title%,'?','_')$puts(a,$replace(%version%,'Alternate, ',,'Demo, ',,'Original, ',,'Remix, ',,'Reprise, ',,', Alternate',,', Demo',,', Original',,', Remix',,', Reprise',,Alternate,,Demo,,Original,,Remix,,Reprise,))$puts(b,%subversion%)$if($strcmp($get(a),'?'),$puts(a,))$if($strcmp($get(b),'?'),$puts(b,))$if($get(a),' ['$get(a)[', '$get(b)]']',[' ['$get(b)']'])[' - '%subtitle%][' ('$if($and($not($strcmp($len($meta(album artist)),0)),$not($strcmp($if2($meta(album artist2),$meta(album artist)),$if2(%artist2%,$meta(artist)))),$not($strcmp($meta(artist),$meta(performer)))),$puts(n,$if($or($strstr(%sorting%,Classique),$strstr(%genre%,Classique)),$if($strcmp($meta(album artist),Compilation),,performer),artist))$puts(m,$if2(%artist2%,$meta($get(n),0)))$if($and($strchr($get(m),'('),$strcmp($strchr($get(m),')'),$len($get(m)))),$puts(a,$left($get(m),$sub($strchr($get(m),'('),2))),$puts(a,$get(m)))$puts(m,$if(%artist2%,,$meta($get(n),1)))$if($and($strchr($get(m),'('),$strcmp($strchr($get(m),')'),$len($get(m)))),$puts(b,$left($get(m),$sub($strchr($get(m),'('),2))),$puts(b,$get(m)))$puts(m,$if(%artist2%,,$meta($get(n),$sub($meta_num($get(n)),1))))$if($and($strchr($get(m),'('),$strcmp($strchr($get(m),')'),$len($get(m)))),$puts(c,$left($get(m),$sub($strchr($get(m),'('),2))),$puts(c,$get(m)))$if(%artist2%,$get(a),$ifgreater($meta_num($get(n)),3,$get(a)', [...] & '$get(c),$ifgreater($meta_num($get(n)),2,$get(a)', '$get(b)' & '$get(c),$ifgreater($meta_num($get(n)),1,$get(a)' & '$get(b),$get(a))))),)')']
2. "Choose titleformatting" drop-down menu > Try to select the created titleformatting string
3. When selecting the string, it's an instant foobar crash, guaranteed
BTW : foobar 1.3.9, onewaysync 0.5.9
Can you please help ? Thanks.