Hi,
if use this simple script
$filename(test.txt)
$loop($num(%track%,2))$loopend()%_max_counter%$loop(%artist%,1)$loopend() - %_max_counter%$loop(%year%,1)$loopend() - %_max_counter%
in a file list of 12 files with the same artist and the same year, the result is
12 - 12 - 12
instead of
12 - 1 - 1.
What is the problem?
Yours sincerely,
st
I think you're right. I paste a wrong script. But here is the problematic one:
I run this script in a single album (all file has the same %album%) with 25 files (13 different artists):
$filename(test.txt)
$loop(%album% %artist%,1)
%_counter% - %album%: %artist%$loopend()
$loop(%artist%,1)$loopend()%_max_counter% artist(s) | $loop(%album%,1)$loopend()%_max_counter% Album(s) in %_total_files% File(s) | %_total_size%, %_total_time% Hrs
And the result:
1 - Grease Soundtrack: Cindy Bullens
2 - Grease Soundtrack: Frankie Avalon
3 - Grease Soundtrack: Frankie Valli
4 - Grease Soundtrack: John Travolta
5 - Grease Soundtrack: John Travolta & Olivia Newton-
6 - Grease Soundtrack: John Travolta, Olivia Newton-J
7 - Grease Soundtrack: Louis St. Louis
8 - Grease Soundtrack: Louis St. Louis & Cindy Bullen
9 - Grease Soundtrack: Olivia Newton-John
10 - Grease Soundtrack: Sha-Na-Na
11 - Grease Soundtrack: Stockard Channing
12 - Grease Soundtrack: Theme
13 - Grease Soundtrack: Various Artists
13 artist(s) | 13 Album(s) in 25 File(s) | 94,43 MB, 01:08:50 Hrs
The number of album should be 1, not 13.
How to solve that problem? Any idea?
Thank you in advance.
Here is a possible solution for my own problem : if I asked for the %_max_counter% before the second loop (put its value in an unused variable), the script works.
Like this:
$filename(test.txt)
$loop(%album% %artist%,1)
%_counter% - %album%: %artist%$loopend()
$puts(trash,%_max_counter%)
$loop(%artist%,1)$loopend()%_max_counter% artist(s) | $loop(%album%,1)$loopend()%_max_counter% Album(s) in %_total_files% File(s) | %_total_size%, %_total_time% Hrs
The result:
1 - Grease Soundtrack: Cindy Bullens
2 - Grease Soundtrack: Frankie Avalon
3 - Grease Soundtrack: Frankie Valli
4 - Grease Soundtrack: John Travolta
5 - Grease Soundtrack: John Travolta & Olivia Newton-
6 - Grease Soundtrack: John Travolta, Olivia Newton-J
7 - Grease Soundtrack: Louis St. Louis
8 - Grease Soundtrack: Louis St. Louis & Cindy Bullen
9 - Grease Soundtrack: Olivia Newton-John
10 - Grease Soundtrack: Sha-Na-Na
11 - Grease Soundtrack: Stockard Channing
12 - Grease Soundtrack: Theme
13 - Grease Soundtrack: Various Artists
13 artist(s) | 1 Album(s) in 25 File(s) | 94,43 MB, 01:08:50 Hrs
Anyway, I think it is some kind of bug.