Export GENRE multivalue playlist

Here is a Mp3tag export script, which creates a SL split list file, which in turn creates M3U8 playlist files, one for each genre, from a multi value tag-field GENRE.

Tool Mp3tagSplitList
/t/14121/1
Mp3tagSplitList.exe, version 1.01 is needed.

Steps

  1. Load all relevant folders or files in Mp3tag and select all files.
  2. Execute the export script ...
    "Split List#Export GENRE multivalue playlist to SL file.mte"
  3. When the export file "Playlist.Genre.mv.SL.txt" is located on the desktop, ...
    ... then call the tool "Mp3tagSplitList.exe" and select the file "Playlist.Genre.mv.SL.txt".
  4. Then in the destination folder there should exist all the M3U8 files, one file for one genre, containing the file paths to the appropriate genre.
  5. Done.

Split List#Export GENRE multivalue playlist to SL file.mte

01: $filename($getEnv('USERPROFILE')'\Desktop\Playlist.Genre.mv.SL.txt',UTF-8)$loop(1,1)$puts(crlf,$char(13)$char(10))$puts(br,'{br}')$loopend()$replace(

02: $loop(%ARTIST%'|'%ALBUM%)$replace(
03: $if($neql($meta(GENRE,0),),
04: $get(br)
05: '$$$FILEAPPEND='$getEnv('USERPROFILE')'\Desktop\Playlists\Genre\Playlist.Genre.'$validate($meta(GENRE,0),'_')'.m3u8'$get(br)
06: '#EXTM3U'$get(br)
07: '###GENRE='$meta(GENRE,0)$get(br)
08: '#EXTINF:'%_length_seconds%','%ARTIST%' - '%TITLE%$get(br)
09: %path%$get(br)
10: '$$$END'$get(br),)
11:
12: $if($neql($meta(GENRE,1),),
13: $get(br)
14: '$$$FILEAPPEND='$getEnv('USERPROFILE')'\Desktop\Playlists\Genre\Playlist.Genre.'$validate($meta(GENRE,1),'')'.m3u8'$get(br)
15: '#EXTM3U'$get(br)
16: '###GENRE='$meta(GENRE,1)$get(br)
17: '#EXTINF:'%_length_seconds%','%ARTIST%' - '%TITLE%$get(br)
18: %path%$get(br)
19: '$$$END'$get(br),)
20:
21: $if($neql($meta(GENRE,2),),
22: $get(br)
23: '$$$FILEAPPEND='$getEnv('USERPROFILE')'\Desktop\Playlists\Genre\Playlist.Genre.'$validate($meta(GENRE,2),'')'.m3u8'$get(br)
24: '#EXTM3U'$get(br)
25: '###GENRE='$meta(GENRE,2)$get(br)
26: '#EXTINF:'%_length_seconds%','%ARTIST%' - '%TITLE%$get(br)
27: %path%$get(br)
28: '$$$END'$get(br),)
29:
30: $if($neql($meta(GENRE,3),),
31: $get(br)
32: '$$$FILEAPPEND='$getEnv('USERPROFILE')'\Desktop\Playlists\Genre\Playlist.Genre.'$validate($meta(GENRE,3),'')'.m3u8'$get(br)
33: '#EXTM3U'$get(br)
34: '###GENRE='$meta(GENRE,3)$get(br)
35: '#EXTINF:'%_length_seconds%','%ARTIST%' - '%TITLE%$get(br)
36: %path%$get(br)
37: '$$$END'$get(br),)
38:
39: $if($neql($meta(GENRE,4),),
40: $get(br)
41: '$$$FILEAPPEND='$getEnv('USERPROFILE')'\Desktop\Playlists\Genre\Playlist.Genre.'$validate($meta(GENRE,4),'')'.m3u8'$get(br)
42: '#EXTM3U'$get(br)
43: '###GENRE='$meta(GENRE,4)$get(br)
44: '#EXTINF:'%_length_seconds%','%ARTIST%' - '%TITLE%$get(br)
45: %_path%$get(br)
46: '$$$END'$get(br),)
47:
48: ,$get(crlf),,$get(br),$get(crlf))$loopend()
49: ,$get(crlf),,$get(br),$get(crlf))

Split_List_Export_GENRE_multivalue_playlist_to_SL_file.mte.txt (1.81 KB)(For usage remove the extension ".txt")

DD.20140307.1838.CET

Split_List_Export_GENRE_multivalue_playlist_to_SL_file.mte.txt (1.81 KB)

Works perfectly.

Many thanks

Can one of you confirm this is still working? I find it very easy to use multiple genres as playlists that stick with the file tag. But this script is not working for me. Thought I would double-check since this post is so old.

I want to be able to tag genres aka 90s rock;alternative rock and have a script run daily to generate new playlists to pick up an edit in the genre field. Then I will be able to play them through alexa via mymedia since it does not support multiple genre tagging. otherwise I could just use genre as a playlist natively with all the apps that support multiple genres.

If that is the contents of a GENRE field, then you do not have a multi-value field.
Check the extended tags dialogue (Alt-T) for such a file and see if you have at least 2 fields of the type GENRE, one with "rock", one with "alternative rock".
If both values reside in just one field, then you have to split the field to a multi-value field and then the script should work (regardless of its age).