Bug with audioscrobbler submission code

Bug #136000 reported by Adam Olsen
2
Affects Status Importance Assigned to Milestone
Exaile
Fix Released
High
Unassigned

Bug Description

Hello,

I think I found a bug while playing a bit with the audioscrobbler.py module.

In the AudioScrobblerPost class, the post(self) method is called to read all the unsubmitted entries in the audioscrobbler cache and submit the first 10 of them.
The problem is in this section of the code:

{{{

params = {}
count = 0
for track in self.cache[:number]:
    for k in track.keys():
        track[k] = urllib.quote(track[k].encode('utf-8'))
        params[k % (count,)] = track[k]
}}}

The count variable is not incremented. Their should be a count = count + 1 at the end of the first ''for'' loop.
The effect of this bug is that the first entry of the cache is submitted 10 time and the other 9 are lost forever.

I hope this will help.

Franck

This ticket was migrated from the old trac: re #339

Adam Olsen (arolsen)
Changed in exaile:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Adam Olsen (arolsen) wrote :

Fixed in r1414

Changed in exaile:
status: Confirmed → Fix Committed
reacocard (reacocard)
Changed in exaile:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.