HTTP remote control server |
![]() ![]() |
HTTP remote control server |
Mar 20 2007, 22:25
Post
#1
|
||
|
Group: Members Posts: 1 Joined: 20-March 07 Member No.: 41669 |
This is a quick and dirty standalone HTTP remote control server.
The interface looks rather crude but as it uses templates it can be customized easily. It provides limited functionality, including - play, pause, stop, next, previous - showing the current song and status - listing the playlist and selecting a song You will need the foo_controlserver component: http://www.hydrogenaudio.org/forums/index....showtopic=38114 The listening port and host&port of the machine foobar is running can be configured by editing webfoo.conf.txt but in most cases the standard values will do it. With standard configuration, the interface can be accessed through http://localhost:2000 It's written in Ruby because I wanted to try out that language. Jut unpack
webfoo.zip ( 1.15MB )
Number of downloads: 761and run webfoo.exe. Source:
webfoo_src.zip ( 3.06K )
Number of downloads: 526 |
|
|
|
||
Jul 13 2007, 13:35
Post
#2
|
|
|
Group: Members Posts: 3 Joined: 13-July 07 Member No.: 45276 |
Any idea why I always get an "Internal Server Error" for the playlist, when I try to access webfoo from another computer on the LAN?
The error is "undefined method `[]' for nil:NilClass". More details: WebFoo 0.1 HTTP remote interface for foobar2000 Copyright © 2007 by Marcel Schaeben [2007-07-13 15:27:24] INFO WEBrick 1.3.1 [2007-07-13 15:27:24] INFO ruby 1.8.5 (2006-08-25) [i386-mswin32] [2007-07-13 15:27:24] INFO WEBrick::HTTPServer#start: pid=3576 port=2000 HTTP server started on port 2000. Connected to foobar. localhost - - [13/Jul/2007:15:27:32 FLE Standard Time] "GET /control HTTP/1.1" 200 433 http://127.0.0.1:2000/ -> /control localhost - - [13/Jul/2007:15:27:32 FLE Standard Time] "GET /playlist HTTP/1.1" 200 69062 http://127.0.0.1:2000/ -> /playlist localhost - - [13/Jul/2007:15:27:38 FLE Standard Time] "GET /control?cmd=next HTTP/1.1" 200 428 http://127.0.0.1:2000/control -> /control?cmd=next 10.0.0.3 - - [13/Jul/2007:15:28:37 FLE Standard Time] "GET / HTTP/1.1" 200 178 - -> / 10.0.0.3 - - [13/Jul/2007:15:30:06 FLE Standard Time] "GET /favicon.ico HTTP/1.1" 200 178 http://10.0.0.2:2000/ -> /favicon.ico [2007-07-13 15:30:06] ERROR NoMethodError: undefined method `[]' for nil:NilClass C:\DOCUME~1\user\LOCALS~1\Temp\eee.webfoo.exe.8\app\webfoo.rb:92:in `getPlaylist' C:\DOCUME~1\user\LOCALS~1\Temp\eee.webfoo.exe.8\app\webfoo.rb:176 C:\DOCUME~1\user\LOCALS~1\Temp\eee.webfoo.exe.8\app\webfoo.rb:172:in `gsub!' C:\DOCUME~1\user\LOCALS~1\Temp\eee.webfoo.exe.8\app\webfoo.rb:172 C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/httpservlet/prochandler.rb:26:in `call' C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/httpservlet/prochandler.rb:26:in `do_GET' C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/httpservlet/abstract.rb:35:in `__send__' C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/httpservlet/abstract.rb:35:in `service' C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/httpserver.rb:104:in `service' C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/httpserver.rb:65:in `run' C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/server.rb:173:in `start_thread' C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/server.rb:162:in `start' C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/server.rb:162:in `start_thread' C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/server.rb:95:in `start' C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/server.rb:92:in `each' C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/server.rb:92:in `start' C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/server.rb:23:in `start' C:/DOCUME~1/user/LOCALS~1/Temp/eee.webfoo.exe.8/lib/webrick/server.rb:82:in `start' C:\DOCUME~1\user\LOCALS~1\Temp\eee.webfoo.exe.8\app\webfoo.rb:189 C:\DOCUME~1\user\LOCALS~1\Temp\eee.webfoo.exe.8\bootstrap.rb:50:in `load' C:\DOCUME~1\user\LOCALS~1\Temp\eee.webfoo.exe.8\bootstrap.rb:50 10.0.0.3 - - [13/Jul/2007:15:29:13 FLE Standard Time] "GET /control HTTP/1.1" 200 456 http://10.0.0.2:2000/ -> /control 10.0.0.3 - - [13/Jul/2007:15:29:48 FLE Standard Time] "GET /playlist HTTP/1.1" 500 317 http://10.0.0.2:2000/ -> /playlist This post has been edited by MusicNonStop: Jul 13 2007, 13:47 |
|
|
|
Jul 13 2007, 19:33
Post
#3
|
|
|
Group: Members Posts: 3 Joined: 13-July 07 Member No.: 45276 |
I compiled the source with latest versions of Ruby and rubyscript2exe, and it seemed to help somewhat. However webfoo still works very slow when accessed from outside localhost.
|
|
|
|
Jan 10 2008, 19:40
Post
#4
|
|
|
Group: Members Posts: 3 Joined: 13-July 07 Member No.: 45276 |
Help.. Anyone?
|
|
|
|
Feb 15 2009, 11:38
Post
#5
|
|
![]() Group: Members Posts: 167 Joined: 13-June 06 Member No.: 31801 |
This has been superseeded by another component
foo_httpserver http://www.hydrogenaudio.org/forums/index....showtopic=62218 Also that component does not depend on foo_controlserver -------------------- http://foobar2000.saivert.com - foobar2000 component repository
|
|
|
|
Jan 14 2010, 15:30
Post
#6
|
|
![]() Group: Members Posts: 5 Joined: 11-January 10 From: Malibu, CA Member No.: 76983 |
I compiled the source with latest versions of Ruby and rubyscript2exe, and it seemed to help somewhat. However webfoo still works very slow when accessed from outside localhost. I dont have any idea on ruby language. If we can make another one of this by other language or maybe java or C++ I can help you. Give me the algorithm if it is okay so that we can try to use other language. Thanks. -------------------- Jon
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 20th June 2013 - 12:11 |