edit - too late! anyway i'll leave my post:
as far as i know, the existence of a line cannot be conditional.
your best bet is to put it all on one line.
by the way, you can also use this syntax which will return the first value if the tag is present, and the second (in this case null) value if it is empty:
$if(%disc number%,CD %disc number%,)
here is the script i use, and the result for multi-disc albums
Code:
$puts(sep,$transition(' '$trim($repeat('―',2)),$rgb(200,200,200),$rgb(200,200,200)))
$rgb(60,100,60)%album artist%
$get(sep)
$rgb(164,180,134) '['%date%'] '
$puts(normal,$rgb(60,100,60))
$puts(light,$rgb(164,180,134))
$puts(bright,$rgb(205,135,52))
$get(normal)
$replace(%album%,
'(',$get(light)'(',
')',')'$get(normal),
'[',$get(bright)'[',
']',']'$get(normal),
'EP',$get(bright)'[EP]',
'12"',$get(bright)'[12"]',
'7"',$get(bright)'[7"]')
$if(%discnumber%,
$get(sep)$rgb(0,0,255) Disc %discnumber%
,)