INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: New Plugin: YARS - Open Source JSON/HTML Web Server Plugin (Alpha version)  (Read 11453 times)

Streaker

  • Regular Member
  • Recent member
  • *
  • Posts: 35

Download at:
http://code.google.com/p/yars-jrmc-remote-server-plugin/downloads/list

This is an alpha version, so please only use if you are, well, geeky. I would love any feedback y'all have.
 
After installing, restart Media Center and then you can use a browser to access the sample web server interface at http://localhost:18887

The goal of this plugin is to provide a remote http server interface to all Media Center functionality exposed via J River's automation interface and return the results in JSON form.  Currently supported functions include: library browsing, adding/playing view items/files, zone selection, play/pause, track navigation, track info, track rating. More will come as I find time.

The server takes in a variety of commands and returns JSON output. This then provides a building block for other apps/AJAX web apps to access MC functionality. I am using it for a MC/Squeezebox integration project, but I am trying to make it generic enough for other applications.

Also included with the plugin is an sample web app usage, showcasing the currently supported commands. This is accessible at http://localhost:18887  (for now the port is hardcoded, but will be configurable in an upcoming release). You can see all the json commands that are occurring by looking at the YARS Plugin item in Media Center under "Services & Plugins". View this output as a guide for how to call to the json interface until real documentation exists.

The html source for the page can be found at <plugin-install-dir>/static/index.html. This file can be modified on the fly if you feel like it, though only the file index.html can be used for now.

The sample uses the prototype js library to call Ajax commands to the server and present the JSON results in HTML form.

Though my primary goal is a complete JSON server, I plan to support the static web server functionality more completely so that UI/Web savvy folks could drop in static web server content to give a richer web UI.

I'll put the source up in a few days after I clean up a few things like picking an open source license to use. If folks are interested in contributing to the code, let me know, and we'll try to figure out a model for shared development.

Thanks to PaulSinnema & Mr ChriZ for your valuable posts regarding Plugin development.

Tom
Logged

cncb

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3122

Tom,

I get what looks like some errors in the "log" window.  I'm not sure if I missed a step or it is a Vista admin thing.

Code: [Select]
Plugin Initiated
JSON Server listening at http://*:18887/json/
Access is denied
Plugin dir: C:\Program Files\J River\Media Center 12\Plugins\YARSPlugin
Static Server listening at http://*:18887/
Access is denied

Thanks,
Logged
-Craig    MO 4Media remote and player:  Android/TV/Auto | iOS | Windows 10/UWP

Streaker

  • Regular Member
  • Recent member
  • *
  • Posts: 35

The Vista issue is a security issue it seems. XP has no problems but on Vista, I am able to get past the "access is denied" issue only if I start MC by right click and selecting "Run as Administrator".  I'm guessing some folks won't want to have to do that so I'll pursue other options.

Also, a new version can be found at:
http://code.google.com/p/yars-jrmc-remote-server-plugin/downloads/list

20080729 - 0.2 released

  * JSON/WEBPAGE: attempted fix for vista "access denied" issue - using + not * in prefix -doesn't seem to work.
  * Workaround to run in Vista for now is to start MC with "Run as Administrator"
  * JSON: fixed addEnd for files, were being added to beginning
  * JSON/WEBPAGE: added now playing json command and sample web page usage
  * WEBPAGE: limiting web server list results to 500 items for now to avoid JS hangups.
Logged

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D

Sounds interesting, any chance you could put some screenshots up?  :)

Streaker

  • Regular Member
  • Recent member
  • *
  • Posts: 35

Screenshots: (0.2-alpha) - Web UI is still fairly primitive.




Logged

skeeterfood

  • Citizen of the Universe
  • *****
  • Posts: 779
  • We're all just food for the skeeters.

This sounds a lot like the back-end part of XPTunes written as a plug-in instead of a separate stand-alone program.  Any chance you and Messiahs can get together and port his GUI to your back-end?

-John
Logged

Streaker

  • Regular Member
  • Recent member
  • *
  • Posts: 35

This sounds a lot like the back-end part of XPTunes written as a plug-in instead of a separate stand-alone program.  Any chance you and Messiahs can get together and port his GUI to your back-end?

-John
Thanks for the tip, I just posted on the xpTunes thread.
Logged

Livin

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 63
  • Change this by choosing profile
Re: New Plugin: YARS - Open Source JSON/HTML Web Server Plugin (Alpha version)
« Reply #7 on: November 09, 2008, 12:53:04 am »

are there any updates to this?
Logged

Diverdown1964

  • Regular Member
  • World Citizen
  • ***
  • Posts: 179
  • No matter where you go, there you are

Am I right that this plugin isn't working with 14? - it isn't for me...
Logged

HiFiTubes

  • Citizen of the Universe
  • *****
  • Posts: 1123

Quote
I am using it for a MC/Squeezebox integration project,

Would like to hear more on this....
Logged
Pages: [1]   Go Up