Package: mpdscribble Version: 0.2.10-1 Severity: important Tags: patch
When attempting to submit a large number of songs, the submission may be rejected with the comment "Plugin bug: Not all request variables are set - got 2 parameters." The attached patch will slowly reduce then number of submitted songs until a level is reached where audioscrobbler accepts the submission. -- System Information: Debian Release: 4.0 APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.17 Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Versions of packages mpdscribble depends on: ii adduser 3.99 Add and remove users and groups ii debconf [debconf-2.0] 1.5.8 Debian configuration management sy ii libc6 2.3.6.ds1-7 GNU C Library: Shared libraries ii libglib2.0-0 2.12.4-1 The GLib library of C routines ii libgnutls13 1.4.4-2 the GNU TLS library - runtime libr ii libsoup2.2-8 2.2.96-1 an HTTP library implementation in ii libxml2 2.6.27.dfsg-1 GNOME XML library ii logrotate 3.7.1-3 Log rotation utility ii lsb-base 3.1-18 Linux Standard Base 3.1 init scrip mpdscribble recommends no packages. -- debconf information: * mpdscribble/user: darac * mpdscribble/systemwide: true
--- mpdscribble-0.2.10/as.c 2006-05-28 12:22:18.000000000 +0100 +++ mpdscribble-0.2.10.new/as.c 2006-11-02 20:01:06.926305300 +0000 @@ -41,7 +41,7 @@ #define AS_HOST "http://post.audioscrobbler.com/" /* don't submit more than this amount of songs in a batch. */ -#define MAX_SUBMIT_COUNT 50 +int MAX_SUBMIT_COUNT = 50; typedef enum { @@ -238,6 +238,11 @@ char *start = line + strlen (FAILED); if (*start) warning ("submission rejected: %s", start); + if (strncmp(line, "Plugin bug", 10) && MAX_SUBMIT_COUNT >= 2) + { + MAX_SUBMIT_COUNT--; + notice("reducing bulk submission to %d items", MAX_SUBMIT_COUNT); + } else warning ("submission rejected"); }

