Wednesday, July 23, 2008

ml_ipod & Last.FM are happy again!

For the last few months I've had problems with syncing my Ipod up with my Last.FM account. Last.FM is a social networking site similar in concept to myspace, but it is primarily for sharing and exploring new music. Now you don't share the actual songs with anyone, just the fact that you listened to it. It's a fun, easy way to see what your friends are listening to and many of the bands listed have samples of their songs for you to check out.

Also, I refuse to use Itunes in Windows because it's a bloated piece of crap and lacks many of the features I think should be standard in a media player (why oh why can't it just rescan my library?!?), as such it's only installed to get the iPod up and running and then I never run it again if I can help it.

What I do use is the ml_ipod plugin for Winamp. This allows me to use my favorite desktop mp3 player and have it manage all my ipod songs/playlists/etc. One of the cool extras that comes with the last couple versions is the Last.FM/Audioscrobbler support. This allows you to have whatever you play on the iPod automatically sync with your Last.FM account so people can see what you listen to throughout the day while out and about.

Now I mentioned that for a few months I was having problems, and it appeared to be quite sporadic. Last.FM was ignoring the tracks that I'd listened to throughout the day, though was not giving any errors so as to indicate what might be the problem. However, if I played a track straight from Winamp, it properly showed up on Last.FM. Nothing played on the iPod while it was undocked would ever make it to the site. This didn't use to happen and I can't exactly pinpoint when it started, I'd just lived with the problem for a while now.

I finally got fed up and began some serious troubleshooting. After uninstalling/reinstalling Winamp and the ml_ipod plugin (after manually deleting gen_audioscrobbler.dll and making sure I was getting the right one) various iPod database cleanup tools, changing settings in both Winamp and ml_ipod all to no avail. I came across this page that detailed some of the workings of the Last.FM plugin.

More precisely, these criteria for when submitting a track.

  1. Any submissions caught by the spam filter will be silently dropped (you will receive an OK response). In such cases, an error message is usually placed on the user page for a few hours.
  2. Chronological Order Rule - Songs must be submitted in chronological order. This means that if you were listening offline, and the plugin has cached some tracks waiting to submit when you reconnect to the internet, the plugin needs to send the cached tracks in the order they were played BEFORE it sends the track you are now listening to. Once you submit a track, anything with an earlier date is rejected.
  3. UTC Only Rule - Your plugin must submit the time in UTC. Any submissions with a date too far ahead or behind UTC will be rejected.
  4. Realtime Listening Rule - The server will ignore subsequent submissions if you claim to have played more tracks in one time period that you could fit in, if you listened to all of them most of the way through.


After working my way through this list and checking things off it became quite obvious what was happening. At some point my iPod's date/time was reset and when I went to check it, it was something like Apr 4, 2000. Now since this date was in the past, it conflicted with item #2 up there. A quick changing of the date on the iPod, and viola! It started working beautifully again.

No comments: