The most important subscriber feature is to listen to individual radio stations based on playlists or tags. A playable radio station must have 45 tracks from 15 artists. Limits for playlists: A last.fm playlist can have up to 200 tracks. No limits for tags: You can tag a unlimited number of tracks with your individual tags. This utility set allows it for you to listen to (nearly) the same music on your local media player as on last.fm. The key to achieve this is by transfering playlist data - from your local media player to last.fm and vice versa. That's the intention and purpose of this utility set.
Overview - What can I do with the utility set?
- You can transfer playlists from your local media player to last.fm and vice versa.
- You can transfer your last.fm lovedTracks to your local player and vice versa.
- You can copy last.fm playlists (yours or from others) into your profile.
- You can add complete albums to your last.fm playlists.
- You can tag the content of a xspf playlist (a nonexistent track will be added automatically to your music lib).

Within last.fm:
- last.fm album → last.fm playlist (lastfm2lastfm.pl)
- last.fm playlist → last.fm playlist (lastfm2lastfm.pl)
- last.fm top tracks → last.fm playlist (toptracks2lastfm.pl)
From last.fm to outside:
- last.fm playlist → xspf playlist (lastfm2xspf.pl)
- last.fm lovedTracks → xspf playlist (lovedTracks2xspf.pl)
From outside to last.fm:
- xspf playlist → last.fm music lib (xspf2tag.pl; by tagging)
- xspf playlist → last.fm playlist (xspf2lastfm.pl)
- xspf playlist → last.fm loved Tracks (xspf2lovedTracks.pl)
- iTunes (Windows) playlist → last.fm playlist (iTunes2lastfm.pl)
From iTunes to outside:
- iTunes (Windows) → xspf playlist (iTunes2xspf.pl)
- iTunes (OS X) → xspf playlist (iTunesMac2xspf, AppleScript, Snow Leopard)
- iTunes (Windows) → last.fm playlist (iTunes2lastfm.pl)
From outside to iTunes:
- xspf playlist → iTunes (Windows) playlist (xspf2iTunes.pl)
- xspf playlist → iTunes (OS X) playlist (xspf2iTunesMac, AppleScript)
Helper utilities:
Helper utilities for playlists:
- list last.fm playlists (list_lastfm_playlists.pl)
- list iTunes playlists (list_Itunes_playlists.pl)
Helper utilities for (playlist) tracks:
- list last.fm tracks (list_lastfm_tracks.pl)
- list iTunes tracks (list_iTunes_tracks.pl)
- list xspf tracks (list_xspf_tracks.pl)
Other helper utilities:
- list last.fm Top Albums (list_lastfm_topalbums.pl)
- list last.fm top tracks (list_lastfm_toptracks.pl)
- fetch last.fm Session Key (fetch_lastfm_SessionKey.pl)
Requirements - Which computer platforms are supported?
- Most of the utilities are platform independent.
- The utilities are tested under Windows, Linux and OS X.
- All utilities are written in Perl (a computer language).
- You have to install a Perl interpreter (free available).
- Link to free ActivePerl: http://www.activestate.com/activeperl/
iTunes - Which iTunes version is supported?
- The iTunes utilities are only working under Windows.
User interface - Is there a GUI?
- No, all utilities have a textual interface?
- You have to start a "Command Window" or "Terminal/Console".
- You run each utility within the "Command Window" or "Terminal".
- You specify all control parameters on the command line.
- You get a textual output of what happens.
- You get a detailled logfile of what has happend.
Windows - How to start a "Command Window"?
- "Start" → "Programs" → "Accessories" → "Command Prompt"
Linux / OS X - How to start a "Command Window"?
- You typically have a menu to start a "Terminal" (sometimes called "Console").
Command Window / Terminal - What are the best settings?
- The recommended size setting is 132 x 43 (rows x colums).
- Linux / OS X: Use character set "UTF-8" if available.
- Windows: Determine your codepage setting with the "mode con" command.
Language support - Are my language specific characters supported?
- Your language specific characters are basically supported.
- It's important to configure the terminal encoding according to your codepage setting.
- This configuration is done in the config file of each utility.
Configuration - Is a configuration of the utilities required?
- Yes, each utility has a configuration file (*.cfg).
- You typically configure your "terminal encoding" and "proxy setting".
Help - Where can I find more information about the usage of the utilities?
- Start the utility without any parameters.
XSPF - What is that?
- XSPF is the XML format for sharing playlists.
- The xspf data file acts as an intermediate format for playlist exchange.
Local Media Player - Which players support XSPF?
- XSPF support is available for a lot of local media players.
- Eg. Amarok, Banshee, VLC media player, MusicIP, Foobar2000, ...
- If your media player has the facility to write xspf playlists, you are able to transfer them to last.fm.
- For iTunes (Windows, OS X) xspf support is given by this utility set.
Session Key - What is that?
- The last.fm session key is similar to a password.
- You need the session key for write access into your last.fm profile.
- Everybody who knows your session key has write access to your account.
- Keep the session key save and private.
- You will need your session key again and again.
- The session key is valid indefinitely.
- You can invalidate the session key by removing the application "lfmCMD.pl".
- Removing is done on the settings page of your last.fm profile.
Session Key - How to get one?
- The process to gain a session key is only required once.
- You have to authorize the application "lfmCMD.pl".
- Use the helper utility "fetch_lastfm_SessionKey.pl" to get a session key.
- The utility leads you step by step through the process of gaining a session key.
Playlist ID / album ID - What is that?
- Each playlist in last.fm is identified by an unique ID.
- An album is a special kind of playlist and also has an ID.
- Multiple playlists can have the same name.
- This applies to iTunes as well as for last.fm.
- Clearly identifiable is a playlist only by the ID.
- That is the reason why the utilities are expecting IDs as parameters.
Example workflow - Filling an album into a last.fm playlist:
- list_lastfm_topalbums.pl (figure out the source album ID) (Screenshot)
- list_lastfm_playlists.pl (figure out the destination playlist ID) (Screenshot)
- lastfm2lastfm.pl (Screenshot)
Example workflow - Transfering an xspf playlist to last.fm:
- generate the xspf playlist with your local media player
- list_xspf_tracks.pl (control the content of the xspf playlist) (Screenshot)
- list_lastfm_playlists.pl (figure out the destination playlist ID) (Screenshot)
- xspf2lastfm.pl (Screenshot)
Example workflow - Transfering all lovedTracks into an iTunes playlist:
- lovedTracks2xspf.pl (Screenshot)
- list_iTunes_playlists.pl (figure out the source playlist ID) (Screenshot)
- xspf2iTunes.pl (Screenshot)
Example workflow - Transfering an iTunes playlist to last.fm:
- list_iTunes_playlists.pl (figure out the source playlist ID)
- list_lastfm_playlists.pl (figure out the destination playlist ID)
- iTunes2lastfm.pl
Example workflow - Generating a last.fm playlist:
- list_lastfm_playlists.pl (figure out the destination playlist ID)
- list_lastfm_toptracks.pl (control the results)
- toptracks2lastfm.pl (transfer top tracks to playlist)
Run the xspf AppleScripts in iTunes (Macintosh):
For a single Users: Create a "Scripts" folder in the [username]/Library/iTunes/ folder.
For all Users: Create a "Scripts" folder it in the Library/iTunes/ folder of your startup drive (you may have to create the "iTunes" folder).
Put the xspf scripts in the "Scripts" folder and they will appear in the iTunes toolbar.
iTunesMac2xspf: This utility exports a selected iTunes playlist to a XSPF playlist file.
Usage: Select a playlist within iTunes - this playlist will then be saved as XSPF playlist file.
xspf2iTunesMac: This utility imports the contents of a XSPF playlist file into a new iTunes playlist (in other words: it acts as a track resolver).
Usage: Load a XSPF playlist file and choose a name for a new iTunes playlist. Each XSPF playlist entry, which already exists in your iTunes library, will then be duplicated into the new created iTunes playlist.
Currently there are no limits concerning the selected playlist or the number of tracks for processing. A non-exsistent iTunes track location (missing value) will also be omitted in the resulting XSPF playlist file. Both utilities are very fast if they are started from the iTunes toolbar.
Example workflow - Create a new last.fm tag radio station based on your iTunes (Macintosh) library:
- iTunesMac2xspf (from the iTunes toolbar; save an iTunes playlist as XSPF file)
- xspf2tag.pl (from a terminal; transfer the contents of the XSPF file to last.fm by tagging each track)
What else can I do with the utility set?
- You have put a lot of effort into your playlist and/or lovedTracks collection. So it's a good idea to backup all the data.
Conclusion:
With the utility set you are able to pull out the best of last.fm and your local media player. I hope that it is helpful for you.
Link to utility set: lfmUTIL-20100424.zip