Playlist Export

Hi
I am creating an export to create a playlist of selected tracks, which I have imported from an iTunes playlist based on ratings. So far I have

$filename(M:\MP3\%artist%\%artist% - Favourite Tracks.m3u)#EXTM3U
$loop(%track%)$loop(%_filename_ext%)#EXTINF:%_length_seconds%,%artist% - %title%
%_folderpath%%_filename_ext%
$loopend()$loopend()

My folder structure is

M:\MP3\artist\year - album\track.mp3

I want the playlist to be saved in the artist folder. This is working, but when I run the action against all the folders for a particular artist it is only picking up the tracks within the last album. I don't want to use append data because I may need to keep rerunning this action and don't want to append duplicates to the existing file (would prefer to overwrite it with new data). I thought about using $loop(%artist%) in the script but this makes no difference.

Any idea what I need to do to change the script so that it puts all the selected tracks from all albums for that same artist in the playlist

Thanks

Uncheck [ ] one file per directory

or

Use two export actions.
The first just writes
#EXTM3U

The second contains the rest of the code and appends the text.

Thanks for the advise. I have now got the following working exactly as I want apart from one thing:

ACTION 1
$filename(\\NAS\Music\Artist Playlists\%artist% - Favourite Tracks.m3u)#EXTM3U

ACTION 2
$loop(%path%)#EXTINF:%_length_seconds%,%artist% - %title%
%_path%
$loopend()

Both actions have 1 file per directory clicked and Action 2 has append data clicked

I am running this after loading all rated tracks from a playlist exported from iTunes. This includes some tracks that are on compilation albums and therefore have the artist set separately for each track. The name of the output file in Action 1 is getting the name of the first artist that appears on each compilation.

On each of the compilation albums I have set the AlbumArtist tag to Various Artists.
Is there a bit of code I can add to Action 2 that checks to see if AlbumArtist is Various Artists and if it is to name the filename in Action 1 after the album name rather than the artist.

You can include this in the filename:

$if($eql(%albumartist%,Various Artists),%album%,%artist%) - Favourite Tracks.m3u

Thanks, that has worked great

I have one last problem. On some albums which I have not tagged as Various Artists I have tracks by different artists, normally one, two or three artists. So for instance I have The Platinum Collection by Bryan Ferry & Roxy Music. So some tracks are tagged as %_artist% Roxy Music and others are tagged as Bryan Ferry.

The album is stored at M:\MP3\Bryan Ferry & Roxy Music\2004 - The Platinum Collection\CD1\track1.mp3
etc

My playlist output at the moment picks up the %_artist% from the first track it finds which in this case is Roxy Music, but it then includes the Bryan Ferry tracks in the same playlist. My code in Action 2 is as before ie

$loop(%path%)#EXTINF:%_length_seconds%,%artist% - %title%
%_path%
$loopend()

How can I get it to create two playlists one for Roxy Music and one for Bryan Ferry, without messing up the majority of my other album playlist creation which is working fine

Not managed to get this to work yet. Anyone got any clues please
Thanks

The export can only create one file per folder so this won't work.

OK, as an alternative I am going to base by artist naming on the artist part of the folderpath which in my example above is Bryan Ferry & Roxy Music, so all the tracks are in the same playlist

My folder path is:

M:\MP3\Artist\Album\Track.mp3

although sometimes it might be

M:\MP3\Artist\Album\CD1\Track.mp3

How can I extract just the Artist part of this folderpath that will work with the different folder path depths. Of course the Artist will be variable length

Try
$regexp(%_folderpath%,'^\w:\\.+?\\(.+?)\\.*',$1)

Brilliant. Works exactly as I wanted. Thanks for your help

Just realised that when I load the data from a WMP playlist the format of the first part of the filename is

\\NAS\Music\MP3\ rather than M:\MP3\

I changed the code to this

$regexp(%_folderpath%,'^\\.+?\\.+?\\.+?\\(.+?)\\.*',$1)

This appears to work, but I'm just wondering whether I need the question marks in the first part of this. I'm not entirely sure what they are doing. Is there a cleaner way to pick up the first part of the folderpath which will always be \\NAS\Music\MP3.

Thanks

What's about using this script code ...

$replace(%_folderpath%,'\\\\NAS\Music\MP3\','M:\MP3\')

DD.20121112.0911.CET

You can do it with the help of an extra tool:
/t/14116/1

1 Like