@Blockdude. If I understand you correctly, then that depends on the filter Query used. Check out the foobar2000 Query syntax.
@Black_Over_Bills_Mothers
View by Band // $if2($swapprefix([$meta(band,0)],A,The), 'Non Album')|$if($stricmp($meta(band,0),various artists),,['('%date%') '])%album%[|Disk %discnumber%]|[%tracknumber% ][%track artist% - ]%title%
Your above pattern is attempting to insert a conditional branch that the script doesn't support, as described in the documentation. It does handle the scenario by inserting a hyphen instead. The reasons for not supporting conditional branches have been discussed before. Essentially adding the feature would require re-writing much of the library handling in a different way, and since its running in jscript, that way would slow things down too much based on my tests.
The best patterns I quickly came up with are as follows:
View by Band // $if2($swapprefix([$meta(band,0)],A,The), 'Non Album')|$if($stricmp($meta(band,0),various artists),,['('%date%') '])%album%|[[%discnumber%.]%tracknumber% ][%track artist% - ]%title%
View by Band // $if2($swapprefix([$meta(band,0)],A,The), 'Non Album')|$if($stricmp($meta(band,0),various artists),,['('%date%') '])%album%[ - Disk %discnumber%]|[%tracknumber% ][%track artist% - ]%title%
@Lucidae & marc2003. There will be a new version shortly with library viewer selection support.