If you're a Mac user using a web server to stream MP3s, you've probably run into a couple problems with some otherwise cool apps. First and foremost there's iTunes which, bless its heart, totally botches the handling of M3U files. Instead of recognizing a net-based playlist as just that - a playlist - it executes some sort of "import" function, loads all the listed URLs into your library, plays the first one as expected, then continues on in alphabetical order through your entire iTunes library. As an example, my M3U playlist is likely to start with The King of Carrot Flowers Pt. 1 by Neutral Milk Hotel. (It's quite rightfully the first track on every indie rock playlist created since 1998.) I don't deny that it's a great song, but by the end of it, iTunes has all but forgotten the playlist and has apparently acquired a royalty fixation rivaling British tabloids. Here's what's on deck:
King & Queen Of Siam -- Frank Black
King And Caroline -- Guided By Voices
King at Night -- Bonnie 'Prince' Billy
King Chico -- Donner Party
King Horse -- Elvis Costello
King Kong -- The Kinks
King Kong -- Daniel Johnston
King Kong -- Tom Waits covering Daniel Johnston
...and so on. It's arguably an interesting playlist, but it disregards the M3U file I just downloaded, which may have had some other, non-alphabetical theme (carrots? flowers? non-arbitrary song streaming via the web?). Anyway, it took me a while, but I finally found the fix in this ancient post, and it works like a charm. (It's a small applescript file you can save and associate with downloaded ".m3u" files so they're imported into iTunes as "native" playlists and then handled correctly.)
Then there's the cool semi-social network service, audioscrobbler, which always seemed like a good idea to me...if only it was a networked service that actually worked with networked music. The problem is that the plugins are coded to ignore streamed MP3 files...so no matter how many times I'd installed audioscrobbler tools on XP or OSX, they simply wouldn't register that I was playing music. Today I discovered another old discussion about enabling audioscrobbler with tracks streamed via rendezvous, which lead to another simple applescript trick. I only had to comment out one line (maybe because the OSX plugin I'm using is newer than the thread), and here's how to do it. Open the applications folder, right-click on the audioscrobbler app to "Show Package Contents". In the Contents/Resources/Scripts folder, you'll find the controller script. Open that file with the script editor, comment out the return "RADIO"
line in the URL case as shown below, save the file, restart the audioscrobbler app, and your audioscrobbling has begun. Lucky me, I'm already up to 13 tracks!
if trackClass is URL track then
set songLocation to address of theTrack as string
(* next line commented out to make URL MP3s work *)
(* return "RADIO" *)
else (* shared track *)
set songLocation to "Shared Track"
(* commenting out the next line makes rendezvous MP3s work *)
return "RADIO"
end if
I have the same m3u problem with itunes. Found your blog and you seem to have fixed it, but the link you gave doesn't seem to be valid anymore. Could you email me the info on how to fix this. Thanks.
Posted by: dan | Thursday, October 13, 2005 at 07:54 AM
Nevermind, I found the correct page here: http://www.balnaves.com/archives/2003/08/index.html#000082
Posted by: dan | Thursday, October 13, 2005 at 07:57 AM
on open m3uFileList
tell application "iTunes"
activate
set newPlaylist to make new user playlist
set name of newPlaylist to (current date) as string
repeat with m3uFile in m3uFileList
add m3uFile to newPlaylist
tell application "Finder"
delete file m3uFile
end tell
end repeat
set the view of browser window 1 to newPlaylist
play newPlaylist
end tell
end open
is the applescript in all its glory !
though I found you need to commen the line about setting the view of the browser to newPlaylist as it breaks if you have it in "zoomed" (much like windows-stylee-minimised) view
Posted by: HUgh | Monday, September 18, 2006 at 08:17 AM
How do you associate files with Applescripts? I can't seem to figure out how to do this!
Posted by: Aaron | Saturday, January 19, 2008 at 12:23 AM