Shop

My New Shop
MTS Creations

Subscribe to My YouTube Channel

Thursday, September 23, 2010

Squeezeboxserver tweek

I have been using squeezeboxserver for sometime now and have loved it!

My wife and I stream our music via squeezeslave to our laptops and my desktop.  (Mac, linux and Windows)

When I mow my lawn I wanted to use my Android phone like a squeezeslave.  The way I have done it in the past was using "SqueezeDroid" or "SqueezeControl" to control the playlist and then use "A Online Radio" to open the stream.mp3.

I didn't think it would be that hard to port squeezeslave to Android.  Well after many hours of searching, there is nothing like that for Android and from what I can tell many people have tried.

Today I found a way around the need for porting squeezeslave!

Here is my findings.

____________________________________________

Squeezeboxserver setup info:
Ubuntu Server 10.4
squeezeboxserver 7.5.1
____________________________________________

Stop squeezeboxserver (/etc/init.d/squeezeboxserver stop)

Edit the perl file in /usr/share/perl5/Slim/Web/HTTP.pm

Line 816 I changed from:
this: "if (!defined($client) && ($path =~ /(?:stream\.mp3|stream)$/)) {"

to this: "if (!defined($client) && ($path =~ /(?:stream\.mp3|stream|phone\.mp3)$/)) {"

I added the following on line 819:

if (($path =~ /(?:phone\.mp3)$/)) {
$address = "123.123.123.123";
}


Line 1129 I changed from:
this: "} elsif ($path =~ /^(?:stream\.mp3|stream)$/o) {"

to this: "} elsif ($path =~ /^(?:stream\.mp3|stream|phone\.mp3)$/o) {"

Start squeezeboxserver (/etc/init.d/squeezeboxserver start)


Now you can browse to your squeezeboxserver and stream your new stream name on any HTTP stream.
http://<squeezeboxserver address>:9000/phone.mp3

The cool thing is that if my phone gets a different IP address from the carrier that it will still keep playing the same playlist without creating a new player each time.

No comments: