Inspired by Paul Stamatiou’s post on a Finder plugin to restart Firefox, I decided to tackle a long standing personal issue with iTunes and last.fm.
For those not in the know, last.fm is in essence a music tracking program; any song you play in your iTunes gets sent to the last.fm site, where you can browse your personal music charts, get recommendations, and find people with similar musical tastes. It’s a very powerful program, but one issue has constantly annoyed me. If you don’t have the last.fm program open, it, obviously, cannot record what songs you listen to.
When last.fm first came out, it acted as a plugin for iTunes, so you did not have to remember to start both programs. Alas, the new (more powerful) version of last.fm is a standalone program, so if you forget to start iTunes and last.fm at the same time, your music does not get “scrobbled” (according to last.fm, “Scrobbling a song means that when you listen to it, the name of the song is sent to Last.fm and added to your music profile”).
The fix is really simple, and like Paul’s plugin for Firefox and Jono’s plugin for Quicksilver, only requires two lines of code.
First, fire up Apple’s Automator.
Then, find and drag the “Run Shell Script” command to the right pane.
Next, add these two lines:
open /Applications/last.fm.app
I’d also recommend checking off the “Show Action When Run” box under Options, so you don’t have a terminal window pop up every-time you start iTunes.
Your Automator window should look something like this:
Now, save your workflow as an Application. In the next step, we’ll replace iTunes with our new application in the dock.
As you can see, I named the app iTunes w/ last.fm and saved it in the Applications folder. Whatever you named it and wherever you saved it, find the application, select it and hit Command I (or click “Get Info” in the menubar) to get to the info window for the newly created app. As you can see, the icon for the app is the little Automator robot, but as I replaced iTunes in my dock with this application, I also updated the icon with the iTunes logo.
Before:
To change the icon, go to the info window for iTunes, select the small iTunes icon at the top of the window, and hit Command C to copy the icon. Now go back to the iTunes w/ last.fm app (or whatever you called it), select the small Automator icon at the top of the window and hit Command V to paste the iTunes icon.
After:
To finish up, I removed the iTunes and last.fm apps from my dock and dragged the iTunes w/ last.fm to the dock. Now, whenever I click the iTunes icon, both last.fm and iTunes open, ensuring my songs will always get scrobbled!
iTunes w/ last.fm app in the Dock
Not only will last.fm open whenever you open iTunes (from the dock), but you’ll never have to update the app as it just opens iTunes and last.fm. Now, if anyone knows how to tweak the code so the last.fm window will hide itself once opened, let me know.
I think it’s already fixed with the new version of the Last.fm player. When I open iTunes, it also opens the Last.fm player. I didn’t understand why, but I don’t wan’t to open them always simultaneously…
You mean all my hard work was for naught!
I can understand why some people wouldn’t want all their songs scrobbled, but I never understood why last.fm wouldn’t make a plugin or at least an option for people like me who want every song and podcast captured…hopefully they’ll implement an option to appease everyone in their next release.
I would like to play my last.fm station through my itunes player. Is that possible?
A google search reveals that there are a few options Tim, check out this article at macosxhints for one way to do so.