The code (stripped down to a minimum to make it easier to understand):
$loop(%_parent_directory%)\b\ul\caps %albumartist% \b0\ul0\caps0\par
$if($stricmp(%albumartist%,%artist%),
\b Genres: \b0 $meta(genre)\par,)
\par
$loop(%_directory%)\tab\b\ul %album% \b0\ul0 \par
\tab\b Year: \b0 %year% \tab\b Date: \b0 %date%\par
\par
$if($stricmp(%albumartist%,%artist%),,$loop($if2(%artistsort%,%artist%),1)\tab\tab\b\ul\caps %artist% \b0\ul0\caps0\par
\tab\tab\b Genres: \b0 $meta(genre)\par
\par
$loopend())$loopend()$loopend()
\par
which I think should give me this when the Album Artist tag and all Artist tags are the same:
ALBUM ARTIST
Genre: genre
Album Year: year Date: datebut this when they differ:
ALBUM ARTIST
Album Year: year Date: dateARTIST 1 Genre: genre ARTIST 2 Genre: genre ARTIST 3, etc Genre: genre
The problem is that on some albums only one track has an artist tag which differs from the album artist tag. I want the script to show the artists below those albums as in example #2. My script is exporting them as example #1 instead. How do I get the script to notice there's a different artist tag in one track?
I think possibly the script is applying the same conditions from the first ALBUM folder to all subsequent ALBUM (%_directory%) folders it finds within the ALBUMARTIST (%_parent_directory%) folder. How do I get it to evaluate albums individually and thus not skip tracks?
I should point out that the skipped tracks do contain the album artist in the artist tag along with one other artist or more. The format for these artist tags is "ARTIST1 / ARTIST2" which is the format foobar now uses. More often than not, one of the artists is the same as the album artist tag, which makes me think my problem could be a limitation of the $stricmp function (which I haven't encountered before in foobar) or a bug in Mp3tag.
My script is doing what I want it to on "Various Artists" albums and albums where none of the artist tags match the album artist tag, i.e. exporting them as in example #2.