- labels: --> libgpod
libgpod seems to ignore the skip counts the ipod shuffle writes to iTunesStats.
mnementh$ od -tx1 -Ax /mnt/ipod/iPod_Control/iTunes/iTunesStats |head -2
000000 8c 00 00 00 00 00 12 00 00 00 00 00 00 00 00 00
000010 00 00 00 00 00 01 00 00 12 00 00 00 00 00 00 00
http://www.ipodlinux.org/wiki/ITunesDB#iTunesSD_file says that the "01 00 00" at offset 0x15 is the skipped count (and indeed I know that for this track I have skipped it). However querying libgpod (via the python API) says:
>>> import gpod
>>> db = gpod.Database('/mnt/ipod')
>>> db[0]['skipcount']
0L
Looking at the sources, the struct playcount has both a "skipped" and a "skipcount" field. The playcounts_read() function which reads the "Play Counts" field fills in the "skipcount" struct field, but the itunesstats_read() function which reads "iTunesStats" fills in "skipped" -- and the code at the bottom of get_mhit() which updates track->skipcount only looks at playcount->skipcount, not playcount->skipped.
I don't know why there are two fields in the playcount struct which apparently both do the same thing -- the obvious fix would be to drop skipped and have itunesstats_read() set skipcount instead. But perhaps I'm missing something.