Hi,

2009/4/22 misterPhyrePhox <misterphyrephox@gmail.com>
I would like to write a program using libgpod that "scrobbles" or
uploads playcount information from an iPod device to the Last.fm
service, which tracks users' listening history. Can anyone recommend a
good way to determine which tracks have been played (and how many
times) since the last run of my tool? The multitude of fields in the
Track data structure confuses me somewhat. I would like to use
recent_playcount, which is "the number of times the track was played
since the last sync", but its not clear what a "sync" is in this
context. Does every time the iPod is plugged in count as a "sync"? I
could compare the overall playcount to the last remembered value, but
the difference between "playcount" and "playcount2" is unclear --
which of these would be most accurate?

Yeah, this is an area that has always confused me a little ;) Never looked at it in details. You can find some information about this on http://www.ipodlinux.org/wiki/ITunesDB/Play_Counts_File
A "sync" refers to a program accessing the ipod while it's plugged in I think. What you have to keep in mind is that the ipod never changes its iTunesDB as far as I know, it writes "offline" playcounts to a PlayCount file and then it's up to applications to read this file and update the iTunesDB accordingly.

Hope that helps,

Christophe