--- xmms-scrobbler-0.3.8.1.orig/scrobbler.c +++ xmms-scrobbler-0.3.8.1/scrobbler.c @@ -488,6 +488,7 @@ { GString *submitentry; int nsubmit; + int i; int wait; if(sc_submit_timeout < time(NULL) && sc_bad_users < 3) @@ -512,7 +513,12 @@ pthread_mutex_lock(&mutex); #ifdef ALLOW_MULTIPLE - q_free(); + if (nsubmit < q_len()) { + for (i=0; i<nsubmit; i++) + q_get(); + } else { + q_free(); + } #else q_get(); #endif --- xmms-scrobbler-0.3.8.1.orig/scrobbler.h +++ xmms-scrobbler-0.3.8.1/scrobbler.h @@ -1,5 +1,5 @@ -#ifndef NET_H -#define NET_H 1 +#ifndef SCROBBLER_H +#define SCROBBLER_H 1 int sc_idle(pthread_mutex_t); void sc_init(char *, char *); void sc_addentry(pthread_mutex_t, metatag_t *, int); --- xmms-scrobbler-0.3.8.1.orig/xmms_scrobbler.c +++ xmms-scrobbler-0.3.8.1/xmms_scrobbler.c @@ -344,6 +344,8 @@ /* keep current value for next iteration */ ps_p = ps_c; + if ( file_p != NULL ) + g_free(file_p); file_p = file_c; playtime_p = playtime_c; pos_p = pos_c; @@ -358,6 +360,7 @@ char *charpos, *dirname; gboolean direxists; submit_t dosubmit; + struct timespec request, remaining; while (run) { /* Error catching */ @@ -463,7 +466,10 @@ pthread_mutex_lock(&m_scrobbler); run = going; pthread_mutex_unlock(&m_scrobbler); - usleep(100000); + request.tv_sec = 0; + request.tv_nsec = 100000000; + while(nanosleep(&request, &remaining) < 0) + request = remaining; } pdebug("scrobbler thread: exiting", DEBUG); pthread_exit(NULL); @@ -472,6 +478,7 @@ static void *hs_thread(void *data) { int run = 1; + struct timespec request, remaining; while(run) { @@ -485,7 +492,10 @@ pthread_mutex_lock(&m_scrobbler); run = going; pthread_mutex_unlock(&m_scrobbler); - sleep(1); + request.tv_sec = 1; + request.tv_nsec = 0; + while(nanosleep(&request, &remaining) < 0) + request = remaining; } pdebug("handshake thread: exiting", DEBUG); pthread_exit(NULL); --- xmms-scrobbler-0.3.8.1.orig/debian/beep-media-player-scrobbler.dirs +++ xmms-scrobbler-0.3.8.1/debian/beep-media-player-scrobbler.dirs @@ -0,0 +1 @@ +usr/lib/bmp/General --- xmms-scrobbler-0.3.8.1.orig/debian/beep-media-player-scrobbler.override +++ xmms-scrobbler-0.3.8.1/debian/beep-media-player-scrobbler.override @@ -0,0 +1 @@ +xmms-scrobbler: no-shlibs-control-file usr/lib/bmp/General/libbeep_scrobbler.so --- xmms-scrobbler-0.3.8.1.orig/debian/xmms-scrobbler.dirs +++ xmms-scrobbler-0.3.8.1/debian/xmms-scrobbler.dirs @@ -0,0 +1 @@ +usr/lib/xmms/General --- xmms-scrobbler-0.3.8.1.orig/debian/xmms-scrobbler.override +++ xmms-scrobbler-0.3.8.1/debian/xmms-scrobbler.override @@ -0,0 +1 @@ +xmms-scrobbler: no-shlibs-control-file usr/lib/xmms/General/libxmms_scrobbler.so --- xmms-scrobbler-0.3.8.1.orig/debian/beep-media-player-scrobbler.copyright +++ xmms-scrobbler-0.3.8.1/debian/beep-media-player-scrobbler.copyright @@ -0,0 +1,16 @@ +This package was debianized by Brett Parker <iDunno@sommitrealweird.co.uk> on +Wed, 27 Oct 2004 13:50:40 +0100. + +It was downloaded from: http://www.pipian.com/stuffforchat/xmms-scrobbler-0.3.8.1.tar.bz2 + +Upstream Authors: Pipian <pipian@pipian.com> + +Copyright: + +This library is free software; you can redistribute it and/or modify it +under the terms of the GNU Library General Public License as published +by the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +You can find a copy of the LGPL in /usr/share/common-licenses/LGPL . + --- xmms-scrobbler-0.3.8.1.orig/debian/xmms-scrobbler.copyright +++ xmms-scrobbler-0.3.8.1/debian/xmms-scrobbler.copyright @@ -0,0 +1,16 @@ +This package was debianized by Brett Parker <iDunno@sommitrealweird.co.uk> on +Wed, 27 Oct 2004 13:50:40 +0100. + +It was downloaded from: http://www.pipian.com/stuffforchat/xmms-scrobbler-0.3.8.1.tar.bz2 + +Upstream Authors: Pipian <pipian@pipian.com> + +Copyright: + +This library is free software; you can redistribute it and/or modify it +under the terms of the GNU Library General Public License as published +by the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +You can find a copy of the LGPL in /usr/share/common-licenses/LGPL . + --- xmms-scrobbler-0.3.8.1.orig/debian/rules +++ xmms-scrobbler-0.3.8.1/debian/rules @@ -0,0 +1,89 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 + +# This is the debhelper compatability version to use. +export DH_COMPAT=3 + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --enable-bmp-plugin --enable-xmms-plugin --disable-debug --disable-meta-debug + + touch configure-stamp + +build: configure-stamp build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + -$(MAKE) distclean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k +# dh_installdirs + + # Add here commands to install the package into debian/xmms-scrobbler. + /usr/bin/install -d $(CURDIR)/debian/xmms-scrobbler/usr/lib/xmms/General/ + /usr/bin/install -c $(CURDIR)/.libs/libxmms_scrobbler.so $(CURDIR)/debian/xmms-scrobbler/usr/lib/xmms/General/libxmms_scrobbler.so + /usr/bin/install -d $(CURDIR)/debian/beep-media-player-scrobbler/usr/lib/bmp/General/ + /usr/bin/install -c $(CURDIR)/.libs/libbmp_scrobbler.so $(CURDIR)/debian/beep-media-player-scrobbler/usr/lib/bmp/General/libbmp_scrobbler.so + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs README + dh_installchangelogs ChangeLog + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- xmms-scrobbler-0.3.8.1.orig/debian/changelog +++ xmms-scrobbler-0.3.8.1/debian/changelog @@ -0,0 +1,68 @@ +xmms-scrobbler (0.3.8.1-4build1) dapper; urgency=low + + * rebuild for libmusicbrainz4c2a + + -- Reinhard Tartler <siretart@ubuntu.com> Wed, 21 Dec 2005 17:42:24 +0100 + +xmms-scrobbler (0.3.8.1-4) unstable; urgency=low + + * Rebuild against new libmusicbrainz library now the the C++ transistion for + it has happened (closes: #322583) + * Add in NTPL patch from upstream developer, should fix the xmms hanging + issues. + + -- Brett Parker <iDunno@sommitrealweird.co.uk> Fri, 12 Aug 2005 18:50:00 +0100 + +xmms-scrobbler (0.3.8.1-3) unstable; urgency=low + + * Plug a memory leak in the tag reading code (closes: #316352) + * Fix the submit code for the case where we can't submit so that we submit + everything from the queue rather than just the first 10 songs and clear + the rest (closes: #308421) + + -- Brett Parker <iDunno@sommitrealweird.co.uk> Mon, 18 Jul 2005 20:39:00 +0100 + +xmms-scrobbler (0.3.8.1-2) unstable; urgency=low + + * Disable the debug messages for the plugin. + + -- Brett Parker <iDunno@sommitrealweird.co.uk> Tue, 29 Mar 2005 18:25:00 +0100 + +xmms-scrobbler (0.3.8.1-1) unstable; urgency=low + + * New upstream version with multiple cd support and fixes to APE tags + + -- Brett Parker <iDunno@sommitrealweird.co.uk> Tue, 22 Mar 2005 20:40:00 +0000 + +xmms-scrobbler (0.3.7-1) unstable; urgency=low + + * New upstream version + + -- Brett Parker <iDunno@sommitrealweird.co.uk> Fri, 4 Feb 2005 18:40:00 +0000 + +xmms-scrobbler (0.3.6-2) unstable; urgency=low + + * Fix a bug in the frame handling in the id3v2 tags (closes: #290128) + * Correct the licence to the correct LGPL licence + * Move to main + + -- Brett Parker <iDunno@sommitrealweird.co.uk> Sun, 16 Jan 2005 16:00:00 +0000 + +xmms-scrobbler (0.3.6-1) unstable; urgency=low + + * New upstream release, now works with the java submission system + * Try to remove the dependency on openssl dragged in by libcurl + + -- Brett Parker <iDunno@sommitrealweird.co.uk> Tue, 14 Dec 2004 23:45:00 +0000 + +xmms-scrobbler (0.3.5-2) unstable; urgency=low + + * Add in beep-media-player support + + -- Brett Parker <iDunno@sommitrealweird.co.uk> Mon, 01 Nov 2004 20:10:30 +0000 + +xmms-scrobbler (0.3.5-1) unstable; urgency=low + + * Initial Release. + + -- Brett Parker <iDunno@sommitrealweird.co.uk> Wed, 27 Oct 2004 13:50:40 +0100 --- xmms-scrobbler-0.3.8.1.orig/debian/control +++ xmms-scrobbler-0.3.8.1/debian/control @@ -0,0 +1,26 @@ +Source: xmms-scrobbler +Section: sound +Priority: optional +Maintainer: Brett Parker <iDunno@sommitrealweird.co.uk> +Uploaders: Steve McIntyre <93sam@debian.org> +Build-Depends: debhelper (>> 3.0.0), xmms-dev, libmusicbrainz4-dev, libcurl3-dev, beep-media-player-dev +Standards-Version: 3.6.1 + +Package: xmms-scrobbler +Architecture: any +Depends: xmms, ${shlibs:Depends} +Description: XMMS plugin that sends your track information to audioscrobbler + The AudioScrobbler plugin sends information about the tracks you play in XMMS + to the audioscrobbler.com to build a profile of the type of music you listen to + and find people that have similar tastes in music. For more information on + AudioScrobbler see http://www.last.fm/ + +Package: beep-media-player-scrobbler +Architecture: any +Depends: beep-media-player, ${shlibs:Depends} +Description: Beep plugin to send track information to audioscrobbler + The AudioScrobbler plugin sends information about the tracks you play in Beep + to the audioscrobbler.com to build a profile of the type of music you listen to + and find people that have similar tastes in music. For more information on + AudioScrobbler see http://www.last.fm/ +