I have a script that I swear was working correctly at some point but it appears I have broken it and I am not sure how to fix it. I have the below script embedded in a larger custom tag:
$If(<Album Complete?>="Y",<Album Track Count>,<Album Track Count>/<Track Count>) Tracks
the goal of the tag:
- If the album is complete (ie all tracks are accounted for) it should display something like "31 Tracks": <total number of album tracks available> Tracks
- If the album is NOT complete (ie there are more or less tracks than expected) it should display something like "30/31 Tracks": <total number of album tracks available>/<total number of album tracks expected> Tracks
The problem seems to lie in: <Album Track Count>/<Track Count>
The <Track Count> does not give me the total expected track count of multi-disc albums. It only seems to account for the first disc.
So If I have a 2 disc set where the first discs looks like this:
TRACKNUMBER=<1-16> TRACKTOTAL=16 DISCNUMBER=1 DISCTOTAL=2
and the second like this:
TRACKNUMBER=<1-15> TRACKTOTAL=15 DISCNUMBER=2 DISCTOTAL=2
"31 Tracks" is displayed
But if i delete one of the disc 2 tracks i get: "30/16 Tracks"
ie only the TRACKTOTAL of DISCNUMBER=1 is accounted for...
Long story short - I am trying to display the <expected track count> that <Album Complete?> is using to determine if a album is complete or not and <Track Count> doesn't appear to be it...
Hopefully I have explained that clearly enough. Any thoughts/suggestions would be appreciated. Thanks.