I do something similar with multiple sub-folders but use %totaldiscs% to only do this when there are 2 or more discs
$ifgreater($max(%discnumber%,%totaldiscs%),1,\CD%discnumber%[ %discname%],)
[ %discname%] adds the Disc Subtitle Name of the disc if exists
If you want to keep everything in one folder
You could do this to the CUE file
\%artist% - %album%$ifgreater($max(%discnumber%,%totaldiscs%),1, - CD%discnumber% of %totaldiscs%,).cue
in this example I get (only when there are 2 or more discs)
Artist - Album - CDn of n.CUE[code]
If outputting to one file per track you could play with the filename template.
$ifgreater($max(%discnumber%,%totaldiscs%),1,%discnumber%.,)%tracknumber% %title%
would add the %discnumber% to the %tracknumber% (only when there are 2 or more discs)
1.01 song.flac
alternatively you can just make %discnumber% conditional
[%discnumber%.]%tracknumber% %title%
so it will only be added if exists
If outputting to Image + CUE the filename template could be
%filename%$ifgreater($max(%discnumber%,%totaldiscs%),1, - CD%discnumber% of %totaldiscs%,)
filename - CDn of n.flac
you can use templates to modify the artwork and/or accurip filename (if necessary)
Only one coverart per CD