Import M3U is an applescript designed to import the contents of an M3U playlist into a new iTunes playlist. The default import only seems to handle M3Us describing internet locations; no matter how I formatted my playlist it would not import it. I wrote this to ease my transition to iTunes since I had previously used M3U for all my music playlists.
Usage
In order to use this script, simply drag the desired M3U file to the script's icon and a matching playlist should be generated in iTunes.
Known Issues/Assumptions
Since this script was created for my personal use, I made a few assumptions when writing the script which may or may not be valid for your use. If you need to change any of these, you should be able to edit the applescript to your liking, or let me know and I can probably make a modified version for you. The issues are:
-
The script is somewhat slow.
It's better than it would be if I read the whole file at once, but even parsing line-by-line it's still fairly slow. At least this way you can see when it's still working, but you may want to let it work for larger imports.
-
The script is designed for Windows-formatted files.
Since my M3U files were from a windows machine, I was stuck with the windows-standard CrLf structure. Due to my line-by-line processing, and applescript's less robust handling of escape characters, I couldn't figure out how to get applescript to detect the difference between CrLf and just Lf (or just Cr). As a result, the script currently only works properly with Windows playlists. You should be able to use most text editors to convert if necessary.
-
The script assumes the paths are based on the drive's root
This is just the way I coded it, as I needed to insert the volume path onto the playlist's path to get the proper Mac path to the files. If the paths are incomplete (or incorrect) in your M3U, just do a bit of pre-processing via search-replace to get it right.