PDA

View Full Version : Run SlimServer Under Program Control?



tggreen
2007-06-03, 21:38
Is there a simple way for a program to send a message to SlimServer that will tell it to play a particular music file (with hopefully a way to specify the file path in the SlimServer's file space)? For instance, will hitting a particular URL on the SlimServer port do the trick?


-- Thorn

mherger
2007-06-03, 23:01
> Is there a simple way for a program to send a message to SlimServer that
> will tell it to play a particular music file (with hopefully a way to
> specify the file path in the SlimServer's file space)? For instance,
> will hitting a particular URL on the SlimServer port do the trick?

Go to the technical documentation in SlimServer's help section (web
interface). There you'll find information about the web interface (eg. how
to play a song using an url) and the command line interface (CLI). That
latter is very efficient when programmatically controlling SlimServer.

--

Michael

-----------------------------------------------------------------
http://www.herger.net/SlimCD - your SlimServer on a CD
http://www.herger.net/slim - AlbumReview, Biography, MusicInfoSCR

tggreen
2007-06-05, 17:41
When I try to run the "player" command as described in the help page, the bash shell of Mac OS X responds with "command not found". Does anybody know the fully qualified path for running these commands? I don't see any executables with the proper name.


-- Thorn

kdf
2007-06-05, 21:44
you need to establish a connection to the server first.
try: telnet <serverip> 9090

if that works, you'll get this as a response:

Trying <serverip>...
Connected to <servername>.
Escape character is '^]'.

Then you can start typing in any commands that you want.

you can also use netcat with command lines like this:

echo 'player count ?' | nc <serverip> 9090

just replace <serverip> with the ip address or the host name of the
computer running slimserver

-kdf

tggreen
2007-06-07, 21:31
Are there any completely worked examples where this actually does something? After logging in through telnet, I went through an hour of commend sequences like the following:

players 0 2
players 0 2 count%3A1 playerindex%3A0 playerid%3A4f%3Aa8%3Ad9%3Aab%3A91%3A83 ip%3A127.0.0.1%3A51415 name%3A127.0.0.1 model%3Asoftsqueeze displaytype%3Agraphic-320x32 connected%3A1
4f%3Aa8%3Ad9%3Aab%3A91%3A83 signalstrength ?
4f%3Aa8%3Ad9%3Aab%3A91%3A83 signalstrength 0
4f%3Aa8%3Ad9%3Aab%3A91%3A83 title ?
4f%3Aa8%3Ad9%3Aab%3A91%3A83 title DavidGray-TheOneILove
4f%3Aa8%3Ad9%3Aab%3A91%3A83 path ?
4f%3Aa8%3Ad9%3Aab%3A91%3A83 path file%3A%2F%2F%2FVolumes%2FWD%2520USB%25202%2FITune s%2FUnknown%2520Artist%2FUnknown%2520Album%2FDavid Gray-TheOneILove.wav
4f%3Aa8%3Ad9%3Aab%3A91%3A83 path /Users/thorngreen/Documents
4f%3Aa8%3Ad9%3Aab%3A91%3A83 path file%3A%2F%2F%2FVolumes%2FWD%2520USB%25202%2FITune s%2FUnknown%2520Artist%2FUnknown%2520Album%2FDavid Gray-TheOneILove.wav
4f%3Aa8%3Ad9%3Aab%3A91%3A83 path ?
4f%3Aa8%3Ad9%3Aab%3A91%3A83 path file%3A%2F%2F%2FVolumes%2FWD%2520USB%25202%2FITune s%2FUnknown%2520Artist%2FUnknown%2520Album%2FDavid Gray-TheOneILove.wav
4f%3Aa8%3Ad9%3Aab%3A91%3A83 path /Users/thorngreen/Documents/LowString.wav
4f%3Aa8%3Ad9%3Aab%3A91%3A83 path file%3A%2F%2F%2FVolumes%2FWD%2520USB%25202%2FITune s%2FUnknown%2520Artist%2FUnknown%2520Album%2FDavid Gray-TheOneILove.wav
4f%3Aa8%3Ad9%3Aab%3A91%3A83 file:///Users/thorngreen/Documents/LowString.wav
4f%3Aa8%3Ad9%3Aab%3A91%3A83 file%3A%2F%2F%2FUsers%2Fthorngreen%2FDocuments%2FL owString.wav
4f%3Aa8%3Ad9%3Aab%3A91%3A83 path ?
4f%3Aa8%3Ad9%3Aab%3A91%3A83 path file%3A%2F%2F%2FVolumes%2FWD%2520USB%25202%2FITune s%2FUnknown%2520Artist%2FUnknown%2520Album%2FDavid Gray-TheOneILove.wav

I can't get it to set a path. I can't get it to insert to a playlist. I can't get it to add to a playlist. There are absolutely no error messages whatsoever. Instead, it just sits there and tells me that it didn't change anything about the playlist. Any help?

mherger
2007-06-07, 23:21
> I can't get it to set a path. I can't get it to insert to a playlist.

That's because you're running commands which are to _query_ these values:
"The "genre", "artist", "album", "title" "duration", "remote",
"current_title" and "path" commands allow for querying information about
the song currently playing."

Only a few lines further down the docs there's an example how to play a
song using the path:
"04:20:00:12:23:45 playlist play /music/abba/01_Voulez_Vous.mp3<LF>"

Applications using the CLI include SlimRemote, Moose and Jive.

Michael

tggreen
2007-06-11, 06:59
It's working now. Thanks.


-- Thorn