INTERACT FORUM

Please login or register.

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

Author Topic: MCWS/WebEngine SDK and browsing the library  (Read 1134 times)

rlebrette

  • Guest
MCWS/WebEngine SDK and browsing the library
« on: July 07, 2011, 10:48:05 am »

I try to build a JSON service on top of the available web functions, I'm able to build everything related to the folder hierarchy, but as soon as I reach the media files I'm not able to retrieve the information.

First I've tried using the WebEngineSDK, I've tuned the library.html file to render json instead of pure HTML, but as soon as I reach the media files, I think there's some kind of magic because I suppose the web server is switching to another page which is not the one referenced by the URL returned in the parent call.

Second, I've played with MCWS, I face the same kind of problem as soon as I reach the leaf nodes I think I should use the getFiles API but how can I detect that I've reached the point where I've to switch to this API.

Another question about MCWS is about paging, it seems  that there's no way to do it as it's done with the WebEngineSDK, is it anyway to achieve the same feature?
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: MCWS/WebEngine SDK and browsing the library
« Reply #1 on: July 07, 2011, 11:04:28 am »

You should transition to files when a browse item returns no children.

As for paging, you'll have to handle it in the Javascript code.  Get and parse the whole response and then show portions of it on the HTML.

If there are simple parameters (like paging for the item code), propose them and we might be able to add them.

Thanks.
Logged
Matt Ashland, JRiver Media Center

rlebrette

  • Guest
Re: MCWS/WebEngine SDK and browsing the library
« Reply #2 on: July 07, 2011, 02:05:56 pm »

Thanks Matt,

I'm going to think about the paging stuff.
Would it be possible to have the information that we reach a "leaf" folder in the result of the MCWS/v1/Browse/Children command? Maybe with a more suitable format? (JSon for example :))
It would be easier to manage, and it would allow to avoid an unecessary remote call.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: MCWS/WebEngine SDK and browsing the library
« Reply #3 on: July 07, 2011, 02:46:24 pm »

Would it be possible to have the information that we reach a "leaf" folder in the result of the MCWS/v1/Browse/Children command?

Whether an item has children can vary by item, not just by level (for complex path-based or expression-based browsing rules).  This means it would need to return a per-item value.  And that would slow down the response.


Quote
Maybe with a more suitable format? (JSon for example :))

XML is a pretty standard format.  Could you propose what you would like instead?
Logged
Matt Ashland, JRiver Media Center
Pages: [1]   Go Up