I've noticed a weird behavior when exporting from directories with weird filenames. In my case, I was trying to export the info of the tracks on my iPod. I opned the the root of the iPod with MP3Tag, select all and export. When the export finished and switched to firefox to see the html, I noticed that when I clicked the artist name, there were several copies of the same album listed.
I knwo a couple of things on programming and MP3Tag scripting, so I opened the mte in notepad2 and search for my problem. After some looking at the code, I finally found what I was looking for. Apparently you loop the files first by the ID3 tag Artist, and then you loop again by each folder in the directory. This works OK if your directory is well organized, but in some cases (as the iPod wich has it's own folder structure) this results in several copies of the same album getting listed.
The solution I've found was to change the "loop by" variable from %_folderpath% to %album%.
There's another "bug" that I've faced: If some artist has a name with a single quote " ' ", you can't expand that artist's name to see the albums. For example, if you have "Guns N' Roses", you couldn't see their albums.
The way I found to solve this was to add a replace just like in it's done in the album's section, replacing the single quote in the javascript function show() with an escaped single quote " ' ":
Replace this:
<td id="id%artist%" class="row2" width="40%%"><b><a href="java script:show(''%artist%_'');">%artist%</a></b></td>
With this:
<td id="id%artist%" class="row2" width="40%%"><b><a href="java script:show(''$replace(%artist%,'','\''')_'');">%artist%</a></b></td>
Another add-on that I made was that if the artist has more than 1 album, it writes "Albums", otherwise it just writes "Album".
Just replace this line:
<td class="row2" align="right" width="32%%">$loop(%album%,1)$loopend() %_max_counter% Album(s) %_total_size% | %_total_files% Files | %_total_time% hrs </td>
With this other:
<td class="row2" align="right" width="32%%">$loop(%album%,1)$loopend() %_max_counter% Album$ifgreater(%_max_counter%,1,'s',) %_total_size% | %_total_files% Files | %_total_time% hrs </td>
Finally, if you're a format maniac like me, you won't like to have the tracks numbers listed with different lenghts (ie: 1,2,03,04,05,6,7). To normalize all tracks to 2 digit format replace this:
[%track% | ]%title%
$loopend()
With this:
[$num(%track%,2) | ]%title%
$loopend()
I hope this helps in someway to the developing of this great template!!
Peregrino