Export m3u, sorted by Album

Hi guys, currently generating m3u playlists via:

$filename(%albumartist% - %album%.m3u,utf-8)#EXTM3U
$loop(%_filename_ext%)#EXTINF:%_length_seconds%,%discnumber%$num(%track%,2) - %artist% - %title% - %year%

Only trouble with this is that they are sorted by filename, how to modify it that it would be sorted by directory?
Sorting inside mp3tag column view does not to seem any effect on this.

Hi Etz,

you'd use another $loop around the one that sorts by %_filename_ext% to sort by, e.g., %_directory%

$filename(%albumartist% - %album%.m3u,utf-8)#EXTM3U
$loop(%_directory%)$loop(%_filename_ext%)#EXTINF:%_length_seconds%,%discnumber%$num(%track%,2) - %artist% - %title% - %year%

I actually came to another question now.

Any way to assign $filename dynamically?

Basically what I would like to achieve is have playlist name always as parent folder name.
Catch is that if I export only from single folder it would be the %_directory%, but if there are multiple files selected from multiple subfolders mp3tag defaults to first file directory.
How to achieve, that in this case, it would use %_parent_directory%?

Can you use %_workingdir% there?

1 Like

Neat idea, yes I can... :sunny:

1 Like