Skip to content

Commit

Permalink
qlscrobbler: Fix issue quodlibet#2768
Browse files Browse the repository at this point in the history
  • Loading branch information
luk1337 committed Feb 17, 2018
1 parent db82519 commit 491a5b3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions quodlibet/quodlibet/ext/events/qlscrobbler.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,12 +313,14 @@ def send_submission(self):
to_submit = self.queue[:min(len(self.queue), 50)]
for idx, song in enumerate(to_submit):
for key, val in song.items():
data['%s[%d]' % (key, idx)] = val.encode('utf-8')
data['%s[%d]' % (key, idx)] = val
data['o[%d]' % idx] = 'P'
data['r[%d]' % idx] = ''

print_d('Submitting song(s): %s' %
('\n\t'.join(['%s - %s' % (s['a'], s['t']) for s in to_submit])))
('\n\t'.join(['%s - %s' % (
s[b'a' if b'a' in s else 'a'],
s[b't' if b't' in s else 't']) for s in to_submit])))

if self._check_submit(self.submit_url, data):
del self.queue[:len(to_submit)]
Expand Down

0 comments on commit 491a5b3

Please sign in to comment.