The new Beatport JSON doesn't have an identifier for the track numbers and I was wondering how to access the counter when in the json_foreach_*
loop.
The reason for this is to output to the TRACK tag, TRACK/TOTALTRACKS.
So the code may look like this (notice the new SayCounter function)
json_foreach_reverse "results"
OutputTo "TRACKTEMP" # TRACK/TOTALTRACK|TRACKTEMP
SayCounter
Say "/"
SayOutput "TOTALTRACKS"
Say "|"
outputto "TITLETEMP"
json_select "name"
sayrest
json_select "mix"
ifnot ""
say " ("
sayrest
say ")"
endif
say "|"
OutputTo "TRACKS"
Say "|"
json_foreach_end
# TRACK COUNTER FIX ** DO NOT DELETE
outputto "TITLE"
sayoutput "TITLETEMP"
set "TITLETEMP"
outputto "TRACK"
sayoutput "TRACKTEMP"
set "TRACKTEMP"
@Florian, perhaps there's a way to do this currently?