Math: Adding numeric tags to %_max_counter%

Hi again,

thanks to Dano's input my script is almost complete. Currently output looks like this:

Day - 2007-09-25
5 Albums | 1.54 GB | 54 Tracks

2007-09-25 - [Chanson] %artist% - %album% (1969) [FLAC|777kbps|443.84 MB|2 CDs|24 Tracks]
2007-09-25 - [Pop] %artist% - %album% (1971) [FLAC|793kbps|275.04 MB|3 CDs|12 Tracks]
2007-09-25 - [Folk] %artist% - %album% (1992) [FLAC|798kbps|357.62 MB|1 CD|9 Tracks]
2007-09-25 - [Jazz] %artist% - %album% (1970) [FLAC|735kbps|231.11 MB|1 CD|5 Tracks]
2007-09-25 - [Soul] %artist% - %album% (1969) [FLAC|841kbps|272.58 MB|1 CD|4 Tracks]

I am adding the %TOTALDISCS% tag to my albums ONLY if they have more than 1 disc. The rule for displaying the number of CDs in each line above goes like this:

IF %TOTALDISCS% is there, show it + CDs, else say 1 + CD

Is there a way to do a simple addition of the CD count even though I do not have a number of discs for single-disc albums?

It should look like this:

Day - 2007-09-25
5 Albums | 1.54 GB | 8 CDs | 54 Tracks

My current calculation does not work:


Idea is to use %TOTALDISCS% tag if it is there, else use '1' and add that to another album's %TOTALDISCS% tag OR '1'. And do that for all albums in this loop.

I can't seem to figure it out. Any help is greatly appreciated?

PS: Sorry, can't change the title anymore - I tried to work using the %_max_counter%, but that is not leading anywhere either... . :confused: