PDA

View Full Version : Squeezebox + Amarok w/o using SlimServer?



roey
2006-11-05, 17:05
Hello,

First off I'd like to say that I find the SqueezeBox a pleasure to use (when it works). I've been using it for a few months now and I've definitely enjoyed the convenience of its remote control. There are a few things that *really* get to me, however, and as much as I've searched around, I could not find a viable solution for them. Essentially,

- The SlimServer interface makes listening to music really frustrates me. I (personally) just want to brose my folders and play music from them. With SlimServer, I hit one impediment after another; I've posted about these on separate threads, but essentially:

* I'm being unable to browse a directory if I've capitalized its filename
* it's slow (I think because it's trying to download the artwork, but even I open a directory containing only directories, it's still slow to return an HTML page).
* it's got too many dependencies (mysql, perl, etc.... apparently SlimServer's way too sensitive to API changes on their parts.
* it's ugly no matter which skin I put on it. It's not that the colors and fonts are ugly, it's the whole layout; a decent music player like amarok nails it in my book where user-friendliness is concerned.

- The remote control's "seek" function doesn't work like a traditinal one does: I'd rather seek by pressing and holding the seek button, as opposed to pressing it once to start the search and again to end it.

- I haven't found a way to _disable_ displaying artwork for albums. If my Internet connection's hosed, then SlimServer will take ages timing out waiting to download the artwork (and I don't know from where it's downloading it, either.. I don't recall finding such a setting through the SlimServer UI)
- Sometimes plops and squeaks pop up before a file starts (someone's raised this issue in another thread). For me, it sometimes happens in the middle of file playback, too.


So I just wanted to know how, short of coding something myself, I can control the SqueezeBox3 directly through Amarok (with remote control support as well). I really can't stand the SlimServer UI, and I don't know how anyone else can.

Thanks,
- Roey

Linzer
2006-11-06, 05:15
Short answer is no you can cannot; SlimServer needs to be in place unless you are using the Squeeze Network. Long answer is you CAN use amaroK to be your interface to control your Squeezebox. Here's how: you need to output amaroK to a Shoutcast compatible stream and then use SlimServer to tune in the stream similar to what is shown in this picture http://amarok.kde.org/index.php?set_albumName=album03&id=shouter&option=com_gallery&Itemid=60&include=view_photo.php.

I've done it in the past so I know it works.

hleroy
2006-12-10, 07:47
Hello Roey,

I have developed a (very) basic script for Amarok to control the Slimserver. Every time you play or stop a song in Amarok, it plays and stops it on your Slimserver. Pause/unpause and skipping don't work. But it's better than nothing ;-) and, as you mentioned, the Amarok UI is much more confortable than the Slimserver web interface.

You can download it here:
http://www.kde-apps.org/content/show.php?content=49912

Regards

Hervé Le Roy

roey
2006-12-16, 07:26
Thank you *very* much :)

- Roey


Hello Roey,

I have developed a (very) basic script for Amarok to control the Slimserver. Every time you play or stop a song in Amarok, it plays and stops it on your Slimserver. Pause/unpause and skipping don't work. But it's better than nothing ;-) and, as you mentioned, the Amarok UI is much more confortable than the Slimserver web interface.

You can download it here:
http://www.kde-apps.org/content/show.php?content=49912

Regards

Hervé Le Roy

roey
2006-12-16, 07:47
Hello again,

The script threw an error when I hit 'play'; I had configured it with the following settings:

Slimserver host: 192.168.10.102
(my main computer, not the squeezebox)
Slimserver port: 9000 (the web administration port for SlimServer)
Squeezebox MAC Address: 00:00:00:ff:ff:ff

Here's the error:

Traceback (most recent call last):
File "/home/roey/.kde/share/apps/amarok/scripts/SlimserverControl/SlimserverControl.py", line 78, in ?
main()
File "/home/roey/.kde/share/apps/amarok/scripts/SlimserverControl/SlimserverControl.py", line 73, in main
elif "trackChange" in notification or "playing" in notification: play_track(slimserver_ip, slimserver_port, squeezebox_player)
File "/home/roey/.kde/share/apps/amarok/scripts/SlimserverControl/SlimserverControl.py", line 48, in play_track
result = urlopen(url)
File "/usr/lib/python2.4/urllib.py", line 82, in urlopen
return opener.open(url)
File "/usr/lib/python2.4/urllib.py", line 190, in open
return getattr(self, name)(url)
File "/usr/lib/python2.4/urllib.py", line 313, in open_http
h.endheaders()
File "/usr/lib/python2.4/httplib.py", line 798, in endheaders
self._send_output()
File "/usr/lib/python2.4/httplib.py", line 679, in _send_output
self.send(msg)
File "/usr/lib/python2.4/httplib.py", line 646, in send
self.connect()
File "/usr/lib/python2.4/httplib.py", line 614, in connect
socket.SOCK_STREAM):
IOError: [Errno socket error] (-2, 'Name or service not known')



Hello Roey,
I have developed a (very) basic script for Amarok to control the Slimserver. Every time you play or stop a song in Amarok, it plays and stops it on your Slimserver. Pause/unpause and skipping don't work. But it's better than nothing ;-) and, as you mentioned, the Amarok UI is much more confortable than the Slimserver web interface.

You can download it here:
http://www.kde-apps.org/content/show.php?content=49912

Regards

Hervé Le Roy

hleroy
2007-01-01, 05:43
Hello Roey,

I have googled the error message you sent. I found in forums that this error may be related to a proxy authentication. Do you have any http_proxy configured on your computer?
If this is the case, the solution that I saw in forums is:

replace this line
from urllib import quote, urlopen

by
from urllib2 import quote, urlopen

because urllib2 supports proxy authentication.

I hope it can help you.

Regards and Happy new Year!

Hervé

ps: sorry for taking time to answer, the thread update notification email went directly in the spam folder. arggh!

roey
2007-01-01, 07:28
Hey Hervé,

The replacement line you posted should be:

from urllib importquote
from urllib2 import urlopen

as only urllib has quote(). Now, I still get an error:

Traceback (most recent call last):
File "/home/roey/.kde/share/apps/amarok/scripts/SlimserverControl/SlimserverControl.py", line 79, in ?
main()
File "/home/roey/.kde/share/apps/amarok/scripts/SlimserverControl/SlimserverControl.py", line 74, in main
elif "trackChange" in notification or "playing" in notification: play_track(slimserver_ip, slimserver_port, squeezebox_player)
File "/home/roey/.kde/share/apps/amarok/scripts/SlimserverControl/SlimserverControl.py", line 49, in play_track
result = urlopen(url)
File "/usr/lib/python2.4/urllib2.py", line 130, in urlopen
return _opener.open(url, data)
File "/usr/lib/python2.4/urllib2.py", line 358, in open
response = self._open(req, data)
File "/usr/lib/python2.4/urllib2.py", line 376, in _open
'_open', req)
File "/usr/lib/python2.4/urllib2.py", line 337, in _call_chain
result = func(*args)
File "/usr/lib/python2.4/urllib2.py", line 1021, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.4/urllib2.py", line 996, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error (-2, 'Name or service not known')>


- Roey

----------


Hello Roey,

I have googled the error message you sent. I found in forums that this error may be related to a proxy authentication. Do you have any http_proxy configured on your computer?
If this is the case, the solution that I saw in forums is:

replace this line
from urllib import quote, urlopen

by
from urllib2 import quote, urlopen

because urllib2 supports proxy authentication.

I hope it can help you.

Regards and Happy new Year!

Hervé

ps: sorry for taking time to answer, the thread update notification email went directly in the spam folder. arggh!