Hey guys,
I know there are a lot of playlist questions asked but I've spent an hour searching and can't figure out this one...
Tree is:
\Genre\Artist\Album
I've done the magic playlist per album:
\Genre\Artist\Album\playlist_with_albumtracks.m3u
but I'd like to have a playlist per artist in the root of the artist directory:
\Genre\Artist\playlist_with_all_artist_tracks.m3u
and possibly playlist per genre:
\Genre\playlist_with_all_genre_tracks.m3u
Any clues...?
Create export files.
Export button on the toolbar - New button on the appearing window - Give a name (e.g. Album Playlist, Artist Playlist, etc.) - Edit the export file
What to write in the export file?
- If you want to create an album playlist 'playalbum.m3u' (a playlist containing all the tracks of the album):
-
replace the text of the export file with this:
$filename(%_folderpath%playalbum.m3u)#EXTM3U
$loop(%album%,1)$loop(%_path%)#EXTINF:%_length_seconds%,$if(%artist%,$if(%title%,%artist% - %title%,%_filename%),%_filename%)
%_filename_ext%
$loopend()$loopend()
-
Save the file.
-
Run the script with these checkbox state:
[ ] Append data
[x] One file per directory
- If you want to create an artist playlist 'playartist.m3u' (a playlist containing all the tracks of the artist)
-
replace the text of the export file with this:
$filename(%_folderpath%..\playartist.m3u)#EXTM3U
$loop(%artist%,1)$loop(%_path%)#EXTINF:%_length_seconds%,$if(%artist%,$if(%title%,%artist% - %title%,%_filename%),%_filename%)
%_directory%\%_filename_ext%
$loopend()$loopend()
-
Save the file.
-
Run the script with these checkbox state:
[x] Append data
[x] One file per directory
- If you want to create a genre playlist 'playgenre.m3u' (a playlist containing all the tracks of the same genre)
-
replace the text of the export file with this:
$filename(%_folderpath%....\playgenre.m3u)#EXTM3U
$loop(%genre%,1)$loop(%_path%)#EXTINF:%_length_seconds%,$if(%artist%,$if(%title%,%artist% - %title%,%_filename%),%_filename%)
%_parent_directory%\%_directory%\%_filename_ext%
$loopend()$loopend()
-
Save the file.
-
Run the script with these checkbox state:
[x] Append data
[x] One file per directory
However, if you run the export script twice (for example you find a mispell in your fields, and you fix it), unfortunately the second run append the track information to the end of the previous version of m3us. So before re-run the script, you should delete all the previously created m3u files.
The best solution for this problem would be the support for multi-file creation (more filename declarations allowed) in export scripts (unother sugesstion for Florian...
). If this thing implemented, you shouldn't care of checkboxes anymore... 
Thanks for the pointers!
Your artist export was almost what I wanted, I had to add a %_directory% to the path so it could find the files but easy to do once I understood what your scripts were doing.
Thanks for the help 
Oops, you're right. I just copy-and-past the first version, and forgot to change the path info. But now it's fixed.
This is really close to what I want: A playlist by Artist with all playlists in the C:\Music\Playlists directory. I've tried modifying the code, but I get the wrong path info in the playlist.
Any suggestions?
Not as bad as I thought:
$filename(C:\Music\Playlists\\%artist%.m3u)#EXTM3U
$loop(%artist%,1)$loop(%_path%)#EXTINF:%_length_seconds%,
$if(%artist%,$if(%title%,%artist% - %title%,%_filename%),%_filename%)
%_path%
$loopend()$loopend()
I just had to redirect the $filename to the appropriate directory, and put the full path in the playlist, and have the artist name as the playlist name. Easy! 