I use Samsung YP-U5 MP3 Player which is MTP enabled. When I try to scrobble tracks QTScrobbler hangs up. I found out that this device does not follow MTP Specification and just uses a big value for 'Use Count' property as default (251921 in my case). Thus QTScrobbler takes a long time to generate rows for not played tracks.
I have solved this problem in such easy way (qtscrob-0.10/src/lib/mtp-libmtp.cpp):
126 void Scrobble::mtp_trackinfo(LIBMTP_mtpdevice_t *device, LIBMTP_track_t *track, bool clear_track)
127 {
128 if (track->artist != NULL // check if missing
129 && track->title != NULL // check if missing
130 && track->usecount > 0 // check track has been played
131 && track->usecount < 256 // <-- here is a genial hack :)
132 )
133 {
...
I know it's a device fault and this ticket was created just for note. But maybe YP-U5 is not only device with such odd behaviour, and maybe it will be helpful to add notification feature for suspiciously big 'Use Count' value?
Does the Use Count behave as expected for tracks which have received one or more plays?
Yes. Absolutely.
Thanks. I've pushed that check into git. I don't think a notification is needed since an end user can't do anything about it.
Ok. Good. As you see fit.