Menu

#8 Notify user when 'Use Count' property has very big value

None
accepted
nobody
None
1
2013-02-07
2013-02-06
Mr. Blurred
No

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?

Discussion

  • Robert

    Robert - 2013-02-07

    Does the Use Count behave as expected for tracks which have received one or more plays?

     
  • Mr. Blurred

    Mr. Blurred - 2013-02-07

    Yes. Absolutely.

     
  • Robert

    Robert - 2013-02-07
    • status: open --> accepted
    • milestone: -->
     
  • Robert

    Robert - 2013-02-07

    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.

     
  • Mr. Blurred

    Mr. Blurred - 2013-02-07

    Ok. Good. As you see fit.

     

Log in to post a comment.

MongoDB Logo MongoDB