PDA

View Full Version : Announce: Java-based server, SlightServer 0.2



clumsyoik
2006-01-08, 04:27
Version 0.21 of SlightServer available here:

http://slightserver.batcave.net

(Was originally sendmefile.com - complaints about the downloads are about sendmefile.com, not batcave.net)

From the README:

THERE IS ABSOLUTELY NO WARRANTY OF ANY KIND WHATSOEVER. Especially due to the fact that I have included Windows binaries of flac and metaflac from the "FLAC frontend" project, and vorbiscomment from the website "rarewares.org". Consider these binaries to be untrusted and act accordingly.

Please send any constructive feedback to clumsyoik@hotmail.co.uk.

To set up, edit the file slightserver-0.2/config/slightserver.properties. Tell it where your music files are,
and where you want the server to store it's own files. By default, it searches your home directory for music, and stores its files in ~/.slightserver. On Linux, make sure you have installed metaflac, flac and vorbiscomment.

To run, cd to the directory slightserver-0.2/scripts, and run slightserver.sh [linux] or slightserver.bat [windows]. You MUST be in the scripts directory, or the classpath will be wrong.

Connect the squeezebox2/3 (or softsqueeze) to the server as normal. When the squeezebox connects, it will initially show
how many tracks it has scanned. If it doesn't find your tracks, fix that now.

To change the amount of output, edit config/log4j.properties. In general, use INFO for less output, or DEBUG for more.

SlightServer has 2 modes: the "Now Playing" screen and the browser.

In the "Now Playing" mode, the screen shows the elapsed time, shuffle icon, volume icon, repeat icon, and track rating on the top line.
Pushing buttons 1 to 5 will set the rating for that track. (To be used eventually for smart playlists). The second/third lines show the
artist/album/tracknumber/trackname.

To get to the browser, press Up or Down. The menu structure is defined in config/menu.xml, so it should be reasonably easy to define
menus based on composer, artist or whatever. Currently, it has "random tracks" and "album (sorted by artist)" in it.

Known bugs:
* Poor error handling. Be prepared to restart the server and/or the squeezebox
* Sometimes, the squeezebox gets in a state where it won't play any more music (it displays "initializing"). I don't understand the slim protocol well enough to unbork it
* Files that are transcoded from .ogg to .flac never get deleted. This will fill up your hard drive eventually
* Should cancel a transcode when skipping tracks - skipping 10 tracks in quick succession will result in 10 transcodes all running to completion, and bogging down the server
* Some files are not scanned properly and end up with empty tags
* Very simple tag handling
* No FFWD/REW support
* No web interface
* GIJ crashes with a NullPointerException deep in a library

New and Noteworthy since 0.1:
* Volume now is at the correct scale
* Correctly handle repeated IR codes (e.g. holding down the volume button)
* Transcoded files start faster
* MP3 support
* Configurable menu system
* Random tracks are selected much more efficiently

Listener
2006-01-08, 12:32
I appreciate your effort in making this program. Some comments:

1. I downloaded the zip file. The link didn't work the first time; it timed out. The second time, I got to the sendmefile.com site but it was VERY slow. Then it forced me to stare at the ads for at least a minute before I got the download link. This free service is annoying!

2. I followed the instructions in your email and placed the unzipped files in c:\test\slightserver-0.2.

3. I edited the slightserver.properties file with a text editor and changed the last line to

# music_dir=${user.home}/music
music_dir=c:/My Music/music

I have an iTunes library elsewhere but your format for the path isn't right for Windows XP (c:\documents...\user\My Documents\My Music. And the iTunes library is below that level in iTunes\iTunes Music. I didn't want to try to guess what iTunes folder I needed to point to.

I have a shortcut to C:\My Music in the iTunes library folder. I tried to point slightserver to the simple c:\My Music folder as a way to get started.

4. I opened a command line window, changed the current directory as you specified and ran the slightserver.bat file as you specified. I got an error message 'The system could not find the path specified. I attached a screenshot of the command line window.

5. Different versions of Windows had different conventions on placement of music files and other things. You need to make your scheme work for Win 98 (original, SE and ME) and XP. And maybe Win 2000. It would be simpler to let the user browse to the right directory. And you need to specify which level for the iTunes hierarchy.

6. I realize that this is an alpha release. However, your instructions need to be better. The process didn't work for me and the instructions didn't give me any help in resolving the problem.

Bill

clumsyoik
2006-01-08, 13:49
I appreciate your effort in making this program.

Thankyou.



Some comments:

1. I downloaded the zip file. The link didn't work the first time; it timed out. The second time, I got to the sendmefile.com site but it was VERY slow. Then it forced me to stare at the ads for at least a minute before I got the download link. This free service is annoying!

Yeah, it took ages to upload too. I won't use that service again.



I have an iTunes library elsewhere but your format for the path isn't right for Windows XP (c:\documents...\user\My Documents\My Music. And the iTunes library is below that level in iTunes\iTunes Music. I didn't want to try to guess what iTunes folder I needed to point to.

I have a shortcut to C:\My Music in the iTunes library folder. I tried to point slightserver to the simple c:\My Music folder as a way to get started.

I'm not sure what you mean by "the format for the path isn't right". You can put any path you like for the music_dir; directories are specified by forward slashes, so you could put in c:/documents.../user/My Documents/My Music

Also, on Windows, ${user.home} will expand to c:\documents and settings\user, so you can use that.

I don't think shortcuts will work though, I haven't tested that.



5. Different versions of Windows had different conventions on placement of music files and other things. You need to make your scheme work for Win 98 (original, SE and ME) and XP. And maybe Win 2000. It would be simpler to let the user browse to the right directory. And you need to specify which level for the iTunes hierarchy.

Absolutely correct. For now, it's a simple solution to default to searching the user's home directory, with the ability to change it by editing a text file.

I'd like to have a "setup wizard". Patches are welcomed.



6. I realize that this is an alpha release. However, your instructions need to be better. The process didn't work for me and the instructions didn't give me any help in resolving the problem.

Let's see if we can fix the problem now, then. The first thing that stands out is your JAVA_HOME - \bin\java is is not the normal place for java to be installed on Windows XP.

Can you post the results of the command:

c:\bin\java -version

Regards

CO

Listener
2006-01-08, 14:38
Let's see if we can fix the problem now, then. The first thing that stands out is your JAVA_HOME - \bin\java is is not the normal place for java to be installed on Windows XP.

Can you post the results of the command:

c:\bin\java -version

Regards

CO

I typed the command in a command line window and got a one line response:

The system cannot find the path specified.

There is NO c:\bin directory on my C: drive.
----
I have a Start menu command "Java 2 runtime environment" with a single sub-menu item "Welcome to Java 2". If I click on that item, I get a web page on my hard disk at

file:///c:/Program%20Files/Java/j2re1.4.0/Welcome.html

I'd guess the Java runtime is installed in this directory.

As far as I can see, the \bin path was generated in your s/w.

Bill

clumsyoik
2006-01-08, 15:00
I typed the command in a command line window and got a one line response:

The system cannot find the path specified.

There is NO c:\bin directory on my C: drive.
----
I have a Start menu command "Java 2 runtime environment" with a single sub-menu item "Welcome to Java 2". If I click on that item, I get a web page on my hard disk at

file:///c:/Program%20Files/Java/j2re1.4.0/Welcome.html

I'd guess the Java runtime is installed in this directory.

As far as I can see, the \bin path was generated in your s/w.

Bill
The slightserver.bat script expects to find the java executable at %JAVA_HOME%\bin\java. So the problem is almost certainly that your JAVA_HOME is not set up. It may be my mistake to assume that this environment variable is set up by default by the java installer. I'll have to check.

Try the following command before running slightserver.bat:

set JAVA_HOME="c:\program files\Java\j2re1.4.0"

(I'm guessing the path, from the location of the web page you quoted - it should contain a "bin" directory, with a "java" executable inside that.)

Listener
2006-01-08, 15:26
I looked at the batch file and saw that it expect the JAVA_HOME environment variable to be set.

%JAVA_HOME%\bin\java -classpath ..; (more)

That variable is not set on my XP system. The Java runtimes were installed with the standard installer.

Softsqueeze works w/o the JAVA_HOME variable.

I can set the JAVA_HOME variable but I think you should check your assumption.

---- Next problem
In the Batch file you need to enclose the command name in quotes. A space in the path name of a command ends the command name. Since "C:\Program Files\..." is the standard place to install s/w under windows, you need to fix this.

----- Next problem
I started softsqueeze and got a message saying that I should click on the up or down arrow. When I did, I got two menu lines:
"random play" and "albums - sorted by Artist(0)". If I click on "albums ...", I get a blank 2nd line. If I go back to the previous menu and click on random play, I get a display showing "00:00" followed by what looks like a speaker symbol and a bar.

Dead end. I guess Slightserver didn't find my music library.

--- next problem
Ending execution of Softsqueeze caused an exception. See attached screenshot.

-----
I'm done until Slightserver is a bit farther along.

Bill

clumsyoik
2006-01-08, 15:40
"random play" and "albums - sorted by Artist(0)". If I click on "albums ...", I get a blank 2nd line. If I go back to the previous menu and click on random play, I get a display showing "00:00" followed by what looks like a speaker symbol and a bar.

Dead end. I guess Slightserver didn't find my music library.

-----
I'm done until Slightserver is a bit farther along.


Thanks for your efforts. If you do find a little spare time, I'd be interested to see your slightserver.properties, so I can work out why it didn't find your library.

CO

Listener
2006-01-08, 15:48
Thanks for your efforts. If you do find a little spare time, I'd be interested to see your slightserver.properties, so I can work out why it didn't find your library.

CO

I already listed the only change I made to the properties file but here is the entire file.

Bill


#----------------------------------------------------------------------------
# slightserver.properties
#
# Use a single forward slash as the file
# separator for all OS's, including Windows.
# ${user.home} will be expanded to the user's
# home directory, typically /home/fred on linux
# and c:\Documents and Settings\fred on Windows.
#----------------------------------------------------------------------------
database_dir=${user.home}/.slightserver/database
transcode_cache_dir=${user.home}/.slightserver/transcode-cache
transcode_cache_max_size=120M
podcast_cache_dir=${user.home}/music/podcasts
# music_dir=${user.home}/music
music_dir=c:/My Music/music

funkstar
2006-01-09, 04:25
clumsyoik,

if you need some hosting let me know, i've got some space/bandwidth i don't mind sharing for a project like this :)

clumsyoik
2006-01-09, 05:29
if you need some hosting let me know, i've got some space/bandwidth i don't mind sharing for a project like this :)
Sounds good, what do I need to do?

gandt
2006-01-09, 05:41
Can get the download to work at all - even after multiple gos

clumsyoik
2006-01-09, 06:49
Can get the download to work at all - even after multiple gos
try here:
http://slightserver.batcave.net

Mitch Harding
2006-01-09, 09:16
Do you think the space in your music directory is causing the problem? Do
you perhaps need to enclose it in quotes?

On 1/8/06, Listener <Listener.21c8hb (AT) no-mx (DOT) forums.slimdevices.com> wrote:
>
>
> clumsyoik Wrote:
> > Thanks for your efforts. If you do find a little spare time, I'd be
> > interested to see your slightserver.properties, so I can work out why
> > it didn't find your library.
> >
> > CO
>
> I already listed the only change I made to the properties file but here
> is the entire file.
>
> Bill
>
>
>
> #----------------------------------------------------------------------------
> # slightserver.properties
> #
> # Use a single forward slash as the file
> # separator for all OS's, including Windows.
> # ${user.home} will be expanded to the user's
> # home directory, typically /home/fred on linux
> # and c:\Documents and Settings\fred on Windows.
>
> #----------------------------------------------------------------------------
> database_dir=${user.home}/.slightserver/database
> transcode_cache_dir=${user.home}/.slightserver/transcode-cache
> transcode_cache_max_size=120M
> podcast_cache_dir=${user.home}/music/podcasts
> # music_dir=${user.home}/music
> music_dir=c:/My Music/music
>
>
> --
> Listener
> ------------------------------------------------------------------------
> Listener's Profile: http://forums.slimdevices.com/member.php?userid=2508
> View this thread: http://forums.slimdevices.com/showthread.php?t=19843
>
>

funkstar
2006-01-09, 10:36
Sounds good, what do I need to do?
i've sent you a PM.

Listener
2006-01-09, 17:50
Do you think the space in your music directory is causing the problem? Do
you perhaps need to enclose it in quotes?

On 1/8/06, Listener <Listener.21c8hb (AT) no-mx (DOT) forums.slimdevices.com> wrote:
>...
> # music_dir=${user.home}/music
> music_dir=c:/My Music/music


>

Well, the slightserver.properties file is consumed by SlightServer. I think it is up to the developer to specify what's required.

Bill