View Full Version : Slimserver and Audiocrobbler problem

Craig, James (IT)
2005-02-08, 03:40
Hi Paul,
Yes the file that needs to be edited is Scrobbler.pm.
I use vim to edit files at home - but I probably wouldn't recommend that
unless you're from a UNIX background - or Microsoft Visual Studio which
was installed on my work PC.

In context the line is:
# If we have yet to handshake..
if ($playStatus->haveHandshaked() eq 'false')
# Set up a User Agent to be used during the transaction.

# Identify ourselves as the SlimScrobbler plug-in.


You can just add the following at this point:

I tried it this morning and it doesn't break anything.
But AudioScrobbler was OK so I can't verify it helps!

BTW I think perhaps the reason I don't have to reboot my Squeezebox is
it's wired to the router.
Only my SlimServer is wirelessly connected.


-----Original Message-----
From: discuss-bounces (AT) lists (DOT) slimdevices.com
[mailto:discuss-bounces (AT) lists (DOT) slimdevices.com] On Behalf Of Paul Kubie
Sent: 07 February 2005 23:43
To: Slim Devices Discussion
Subject: [slim] Slimserver and Audiocrobbler problem

Hello James,

Thanks for your reply. I am very willing to try your timeout suggestion

but I am a a newbie when it comes to messing about with code. Can I ask

you to clarify a couple of things:

1. Are you talking about changing the scrobbler.pm code?
2. How do you know which is line 1175. What program are you using to
the scrobbler.pm file that gives you line numbers? I have been editing
in wordpad up till now.

Thanks a lot

On Mon, 7 Feb 2005 15:57:15 -0000, Craig, James (IT)
<James.Craig (AT) morganstanley (DOT) com> wrote:

> Hello Paul,
> I also observed this over the weekend, very annoying!
> As you may already know the new Audioscrobbler hardware was installed
> over the weekend and the service seems a lot more reliable now, so
> may not be a problem any longer.
> One thing that I considered trying is changing the timeout setting of
> SlimScrobbler's user agent.
> This is not set at present so (as you know) it can take minutes to
> decide it's not going to get a response!
> Just having a quick look through the code you could add a timeout at
> line 1175:
> $playStatus->userAgent(LWP::UserAgent->new(timeout => '5'));
> I haven't tried this myself, It's possible that a valid response might
> take longer than the timeout to return.
> Hopefully the 5 second pause in case of error will be covered by the
> Squeezebox's internal buffer.
> The other way to solve this is to move the audioscrobbler submissions
> into a separate process...
> James
> -----Original Message-----
> From: discuss-bounces (AT) lists (DOT) slimdevices.com
> [mailto:discuss-bounces (AT) lists (DOT) slimdevices.com] On Behalf Of Paul Kubie
> Sent: 07 February 2005 15:37
> To: discuss (AT) lists (DOT) slimdevices.com
> Subject: [slim] Slimserver and Audiocrobbler problem
> I am hoping someone on this list can help me resolve this problem.
> Setup - Squeezebox, Windows XPSP2, Slimserver 5.4.1. nightly 31st Jan,
> Slimscrobbler Plugin v0.27. Re-installed yesterday after removing
> trace of previous slimserver setup.
> When I try and submit a song to audioscrobbler and I cannot get a
> connection to the audioscrobbler database the result is that the
> Squeezebox loses contact with the Slimserver and displays an error
> message
> to this effect. Sometimes it will resume contact and start playing the
> next song. Other times I need to hold down the power button for a
> to
> restart the squeezebox. Rarely I actually need to restart the
> windows service to regain contact.
> After this point, everything is ok whilst the audioscrobbler plugin is
> cacheing the songs waiting for the 1800 secs to pass before it
> another submission. Once this time period is up the problem re-occurs.
> This cycle repeats until such time as the audioscrobbler plugin
> manages to connect to the audioscrobbler database and empties the
> of
> songs. When it makes a successful submission there is no loss of
> between the squeezebox and the slimserver but there is a long pause
> between songs. It should submit successfully after each song but
> it does not and this cacheing cycle and loss of contact occurs again
> again.
> Here is a link to a thread on the audioscrobbler site that has
> from my debugging log and a description of what is happening at the
> audioscrobbler end.
> http://www.audioscrobbler.com/forum/28/_/20060
> I hope there is some way around this as I love the
> sites and the benefits I get from them and I would hate to have to
> it because it is messing up the smooth operation of my squeezebox.
> Thanks in advance
> Paul


Listen to the sweet sound of MimaRadio broadcasting electro groove,
downtempo & nu-jazz live from Paris

96kb stream: http://rs4.radiostreamer.com:8360/listen.pls
24kb stream: http://rs4.radiostreamer.com:8390/listen.pls