gtkpodscrobbler by Vicente Aguilar http://www.bisente.com/proyectos/gtkpodscrobbler/ CHANGELOG ========= 20070417 - Initial release LICENSE ======= These scripts are beerware. If we ever meet, you owe me a beer. Or two. Maybe even three. The script iPodScrobbler.py included in this package is (c) by Mike Bleyer and released under the GPL. DESCRIPTION =========== I do most of my music listening with my iPod while driving to/from work, so I wanteded an easy way to submit those listenings to last.fm. After googling for a while I found iPodScrobbler by Mike Bleyer. The next step was integrating it with my iPod manager of choice: gtkpod. INSTALLATION ============ 1. copy scrobbler.* and iPodScrobbler.py to your $HOME/.gtkpod dir. 2. edit $HOME/.gtkpod/scrobbler.vars and set your last.fm username and pass. 3. append (or just overwrite) the content of the supplied gtkpod.in and .out files to those on $HOME/.gtkpod 4. go to "Edit -> Preferences -> Tools -> Options for Calendar/Contact/Notes" and set $HOME/.gtkpod/scrbobler.sync as either of them(*) and check the "Call automatically when synchronizing iTunes" option. (*) It seems that when synchronizing, gtkpod tries to run the three of these programs, and gives an error message when one of them is left blank or can't be found. You can set scrobbler.sync in the three of them to avoid this error, it will only send your songs to last.fm once anyway. HOW IT WORKS ============ iPods mange the songs' playcount in a funny way. There are two files involved: - while "offline", the iPod stores them on the "iPod_Control/iTunes/Play Counts" file as you listen to your music collection. - when you plug the iPod to your computer, the management software (gtkpod, yamipod, maybe even iTunes!) take that file, merge that offline-played count with the iTunesDB file, and delete the "Play Counts" file. What this set of scripts do is: 1. when you start gtkpod, it runs the ~/.gtkpod/gtkpod.in file, which runs 2. scrobbler.in, that copies the "Play Counts" and "iTunesDB" to a temp location in order to avoid gtkpod from overwriting/deleting them when, while or after syncing. 3. when you sync your data in gtkpod it runs scrobbler.sync, which takes the two files previously backed up and feeds them to iPodScrobbler, updating your last.fm stats. Then it deletes the temp files. 4. finaly, when you close gtkpod, it runs gtkpod.out which runs scrobbler.out. This script deletes the temp files, in case you didn't synchronized the data. CAVEATS ======= - it seems that, when you synchronize, gtkpod tries to run the three aux scripts: sync calendar, contact and notes. If you only set one of them you get an error. - it also seems that gtkpod only really syncs and calls these scripts (and gtkpodscrobbler) when there are really any changes to synchronize: you've added, removed or renamed songs on your iPod. Else it does nothing, so if you don't make changes to your iPod contents often, your recently listened songs won't be updated on last.fm. - there seems to be a bug in iPodScrobbler related to (maybe) dailight saving times. All my listenings updated by it appear as done one hour AFTER I really did them. So if I've just been listening to my iPod and immediatelly sync, they seem to be one hour in the future! The miraculous music-listening-prediction machine! TO-DO ===== Is there any small command line program to merge the "Play Count" file with "iTunesDB"? I've taken a look to gnupod and other command line utils but I think none does this. Could we maybe get this as a gtkpod command line options, just like "-p"? Please? :) If there was such a program, gtkpodscrobbler could loose the "gtkpod" part and morph into "udevPodScrobbler": you plug your iPod, it's detected by hotplug/udev, and a script is run which calls iPodScrobbler AND MERGES the playcounts into the iTunes DB. And then, optionally, run gtkpod or whatever.