The best kittens, technology, and video games blog in the world.

Friday, January 19, 2007

README file for ipod-last.fm bridge

Sweet Dreams by Gui, o gato from flickr (CC-NC-ND)
I just uploaded a new release of iPod-last.fm bridge. Changes are a README file, copyright notice (MIT-style "do whatever you want"), and tweaks to the "fake songs" algorithms for more realistic results (it's still off by default).

It can be downloaded from the usual location.

If you have any questions, don't hesitate to ask.

13 comments:

Anonymous said...

hi, just wanted to tell you that I've checked both ipod_lastfm_bridge-current.zip and the one with date in it's filename... and none has README or license.

taw said...

Darn, I forgot to add the README to the list of files that are included in the packages.

It should be fixed now.

Anonymous said...

Hey, I've been using your script and it's very convenient. Occasionally it fails with this error message:

Failed:
FAILED Plugin bug: Not all request variables are set - no POST parameters.
INTERVAL 1

after it has submitted several songs successfully. If I then try again it will get through a few more songs before failing. Any idea what this might be? Thanks!

taw said...

Big Chris: I'm getting this message sometimes too. It don't think it's a plugin bug, as sending exactly the same data sometimes gets such a message and
sometimes not. Maybe it's some misconfigured proxy on last.fm side.

I guess the software should simply wait one second and retry, instead of requiring manual restart. I will upload a version which does so later today.

taw said...

Big Chris: The "Plugin bug: Not all request variables ..." thing should be fixed now. The script retries up to 5 times if it gets any errors.

Anonymous said...

Hey I tried this script out because it seems like exactly what I was looking for, only:
I only have a file Play Counts.bak not Play Counts (first error)
If I rename that to Play Counts I get:
/get_play_counts.rb:142: undefined method `[]' for nil:NilClass (NoMethodError)
from ./get_play_counts.rb:7:in `each_with_index'
from ./get_play_counts.rb:141:in `each'
from ./get_play_counts.rb:141:in `each_with_index'
from ./get_play_counts.rb:141

Anonymous said...

taw: Thanks for the update! Works great

taw said...

Anonymous: Play Counts and iTunesDB files must match - 1st record in Play Counts is about 1st record in iTunesDB and so on. When you add or delete songs iTunesDB changes, so the software copies data from Play Counts file to disk and deletes Play Counts, as outdated Play Counts file obviously wouldn't work. It's possible to update Play Counts file instead of deleting it, but for some reason most iPod managing software doesn't do so.

So try running the script just after pluggin the iPod, and before changing the database.

Unknown said...

Is there any way to hook this up with Amarok to automatically submit ipod played tracks any time I plug the ipod and connect to Amarok? (Amarok already has last.fm support?)

Cheers

taw said...

Anders: Right now not really, you need to run this script by hand before connecting to AmaroK. It should be possible to make AmaroK run the script for you, but I don't know enough about AmaroK to get it done.

Unknown said...

Hi, I have a last generation Ipod (Black Nano with 8GB) and I can't see any Play Count file anywhere neither your script seems to find it. But GtkPod hapilly tells me play count of the songs. Other thing is that this iPod is controlled with GtkPod and rhythmbox only, just one time has been touch by iTunes ending with an empty iPod.

This is a change of this generation or something is wrong here? There is another way to workaround this in order to achieve the same goal, I almost never has touched Ruby code but if you could guide me, maybe I could help, at least I'll surely try.

Regards

taw said...

eald: What files do you see then in iPod_Control/iTunes directory ? Play Counts file is destroyed by gtkpod every time you add or delete any songs, and recreated by iPod software after you play something.

Unknown said...

You are right, GTKPod and Rhythmbox delete the file, so I only have to avoid to use GTKPod before sending files and that Rhythmbox stay closed or without the plugin activated.

But in others news, seems that Rhythmbox now scrobble the songs from iPod, but I don't think it has something like your "fake songs".

Regards