Generate playlist Genres ?!?

Hi all,
i have a lot of mp3 directories , i try to generate the genre playlist with the script

$filename(%genre%.m3u)#EXTM3U
$loop(%genre%)#EXTINF:%_length_seconds%,%track% - %title%
%_filename_rel%
$loopend()

I have as genre (see the screen) "Blues", "Dance", "Dance, Club, House" Divers", "Jazz"

When i execute the export if the order by of the list is "Jazz", Divers", "Dance, Club, House", "Dance","Blues"
I have two playlists Jazz and Divers

When i execute the export if the order by of the list is "Blues", "Dance", "Dance, Club, House", Divers",
"Jazz"
I have two playlists Jazz and Blues

i have two problems
the first : the field content "Dance, Club, House" stop the process
the second , can i update the order by in the script ?

Thanks
Pierrotori


You might want to clean up the $loop() with
$loop($replace(%genre%,',',_))#EXTINF

as I am not sure if the commas in the genre upset the sorting.

Also, you should take care that the track number does not contain the total tracks data as this produces a slash, e.g. 2/18 which might upset the search for a file.
If this cannot be avoided, use the $num() function.