IScrobbler



Iscrobbler

Q: How does the audioscrobbler plugin work?
A: The audioscrobbler plugin checks the tracks you listen to in real-time and uploads the track info to www.last.fm. Obviously, this only works when you are connected to the internet, it does not work with portable players such as the iPod while offline.

Q: So how does iPodScrobbler work?
A: iPodScrobbler is a Python script that can read the 'Last played' timestamp info from your iPod when you reconnect it to your Mac or PC. It then uploads the track info of all tracks you listened to while on-the-go in a batch process (since the last time you uploaded).
Important: the iPod only sets a 'last played' timestamp when you have listened to the whole song from beginning to end! Thus iPodScrobbler can only upload the info when you listen to the whole song, this differs from the behaviour of other audioscrobbler plugins.

Q: Are there other plugins that support the iPod?
A: To submit tracks from your iPod to audioscrobbler, the Mac iTunes plugin supports that directly and for windows there is an audiopod extension that seems to work (http://homepage.sunrise.ch/mysunrise/ph_waeber/audiopod/). YamiPod, an application to manage your iPod (iTunes replacement) supports last.fm too (among many other nice features).
Check last.fms tools page for more options.
I've had mixed results with the Mac iScrobbler plugin, mainly because I manage the tracks on my iPod manually. The plugin seems to have problems recocgnizing the iPod when starting up and also starts iTunes immediately which leads to the Play Counts file being deleted.
So I just developed my own plugin: iPodScrobbler

Requirements for iPodScrobbler

  1. First you need an iPod to start with. Any iPod except for the shuffles should work (the shuffles do not have a clock or do not set timestamps, they simply do not provide the info required for last.fm - sorry).
  2. You need to have Python installed. It's preinstalled on all Mac OSX machines and most Linuxes, free downloads for Windows and other OSs are available on www.python.org.
  3. You need a login (username and password) from www.last.fm.

Step-by-step instructions

Concept:
iTunes and the iPod handle the 'last played' info for a track the following way:
iTunes writes all the info to a file called 'iTunesDB' on the iPod (it's a hidden file). The iPod never writes to this file, it only reads from it. While disconnected, the iPod writes 'last played' info to a seperate file called 'Play Counts' (also hidden). When you reconnect to your Mac/PC, iTunes reads the 'Play Counts' file and adds the info back into the main iTunesDB file, the Play Counts file is then deleted. iPodScrobbler needs to run

AudioScrobbler is a project designed to form music recommendations by sampling 'currently playing' data from the user's media player software. In a nutshell, Audioscrobbler endeavours to be your personal music advisor. It grows to know what music you like by monitoring what songs you play on your computer. The world's largest online music service. Listen online, find out more about your favourite artists, and get music recommendations, only at Last.fm.

beforeIScrobbler iTunes does this, it will read the Play Counts file and submit that info to last.fm.

Step 1: How do I set up iTunes and the iPod?

  1. Connect your iPod, iTunes should start
  2. Go to Edit-Preferences, select the iPod tab. iTunes must NOT start automatically when the iPod is connected.
    Also the 'use iPod as harddrive' option should be enabled.
  3. Quit iTunes
  4. Now listen to your iPod on the go

Step 2: How do I upload tracks when reconnecting to my PC/Mac?

  1. Connect your iPod, iTunes should NOT start, the iPod should become visible as harddrive
  2. Run iPodScrobbler:
    On the Mac, open the 'Terminal' app and type in the following command (assuming the script is in your home directory):
    python iPodScrobbler.py -u username -p password /Volumes/<iPod_Name>
    On Windows open a DOS window (Start-Run type 'cmd')
    there type 'cd Desktop' (assuming the script is on your desktop)
    now run 'C:Program FilesPython23python' iPodScrobbler.py -u username -p password <iPod_Drive_Letter>
  3. Now start iTunes manually
Repeat step 2 every time you reconnect your iPod after listening to music offline. That's all.

Caveats and Don'ts

  • The submissions to last.fm have to be in chronological order. If you stick to the above, all should be ok. If not, you may be classified as a spammer by last.fm - no worries, log in to their website and look at your settings, there you can fix that.
  • Never, ever, run more than one plugin with the same user account at the same time (e.g. iTunes plugin and iPodScrobbler). See above.
  • It takes a while for submitted info to show up on last.fms websites. Be patient.
  • last.fm will not accept timestamps dating from before the day you created your account, thus uploading old timestamps will not work.

FAQ

Getting help:
Please go to the group forum at http://www.last.fm/group/iPodScrobbler/forum and post your questions there.

Is Cobbler Crumble

Q: I keep getting this error: 'FAILED Plugin bug: Not all request variables are set - no POST parameters.' What gives?
A: This is actually some bug on last.fms part, that I could not resolve. The requests are definitely correct, but sometimes they still fail. I assume it's due to some of their anti-spam features (or maybe server overload), I haven't been able to get a reply from them. They don't really like bulk upload tools, it's against the concept of their site (online listening, uploading one song at a time).
They sort of tolerate it because they have to, too many people use iPods after all.
I have added a fix for this problem, iPodScrobbler now retries the request up to 3 times. This is usually sufficient to get it through to last.fms servers. If this doesn't help and you still get that error, you can either try to increase the number of retries in the script (there is a variable near the top) or you can use the --timestamp option to restart the upload again just before that last song that did not get submitted (it's cumbersome I know).

Q: Hey, it seems some tracks I listened to did not get uploaded - why?
A: Some track info gets filtered out by iPodScrobbler or the way the iPod timestamps tracks:

  1. The iPod only sets a timestamp when you listen to the full song, when you skip in a song the info does not get uploaded.
  2. Track info of tracks with a running time of less than 30 seconds never gets uploaded to www.last.fm
  3. Track info with missing Artist or Track Name does not get uploaded.
  4. Track info that is obviously bad (such as 'Various Artists' or 'Track 01') does not get uploaded. You can fix this by correcting your ID tags / track info in iTunes.

Q: I have more feature requests or encountered a bug - what to do?
A: Send me an email please, to Mike at hoc dot net. Please make sure to include the following info:

  • iTunes version you are running (e.g. 6.0.2)
  • iPod firmware version (on your iPod: Settings-About-Version)
  • which iPod model it is (e.g. second or third generation), for a help see here: http://ipodbatteryfaq.com/ipodbatteryandpower.html
  • are you syncing your iPod and iTunes in automatic sync (mirror) mode or in manual sync mode?
  • The output of the script with verbose set to 3, e.g. do a
    python iPodScrobbler.py -d -v 3 <iPod_Drive_Name> > output.txt
    and send me the output.txt file

A new version of iScrobbler came out on April 3rd 2007.

Major changes in 1.5:

Iscribble

  • iPod Shuffle support
  • The currently playing track can be Loved, Banned, Tagged, and Recommended from the Stats window. (10.4+ only)
  • Previously played Tracks/Artists can be Loved, Banned, Tagged, and Recommended from the Top Lists window. (10.4+ only)
  • You can view and change your recently Loved/Banned tracks. (10.4+ only)
  • Removed “Your Fan Rating” from the Artist Details, and replaced it with a listing of the Artist tags (fully clickable).

Iscrobbler

from iScrobbler Downloads & Requirements