PDA

View Full Version : Using the GAC+ SubItemCount to count Albums not tracks



mrchivs
May 3rd, 2006, 02:23 AM
Hi there,

I've been experimenting with GAC+ commands, and particularly interested in the SubItemCount command which appears to be very useful in showing how many subitems there are in a given view scheme. However, I can only get it to return the number of tracks in a view scheme. I'm trying to create a button in a loop frame that first returns the artist name and then the number of albums in brackets after this. So a bit of background...

In JRMC 10, I have a View Scheme set as 'Album Artist (auto)/Album' in the Media Library\Audio directory.

I have a button in a loop frame that has been assigned the following name:

{MP.GACL.Items[<LoopIndex>].Name} ({MP.GACL.Items[<LoopIndex>].SubItemCount})

So for example if I had two albums by Primal Scream (eg Screamadelica (12 tracks) and Give Out But Don't Give Up (14 tracks)), I would expect this button in the panel to show as:

Primal Scream (2)

but instead I get

Primal Scream (26)

Is there anyway I can configure the SubItemCount command to only count the items in the immediate sub directory drilled down to only 1 level, and not all the tracks?

Thanks

mrchivs

Ben S
May 3rd, 2006, 02:37 AM
Interesting. I thought that it did return the count of actual children (not tracks). We'll take a closer look.

mrchivs
May 4th, 2006, 12:40 AM
It's OK, the subitemcount does actually count the children and not the tracks. I had a problem calling the wrong variable, but I've managed to suss it out now. Cheers

Ben S
May 4th, 2006, 05:21 PM
Great! Good to hear.