INTERACT FORUM

Please login or register.

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

Author Topic: Any documentation on web objects?  (Read 2081 times)

avid

  • Regular Member
  • World Citizen
  • ***
  • Posts: 180
  • MC user since 2003
Any documentation on web objects?
« on: May 31, 2010, 05:26:57 am »

Hi,

I have been re-skinning a WebRemote "Appearance" with some success. It now looks and behaves as though it belongs inside my existing Girder web control. It is perfectly adequate for the job.

But I have this suspicion that I could possibly do much better! I have copied the code from the existing (default appearance) use of the objects - like "LibraryItem([z]).IntoLink" etc. These work fine. But is there yet any documentation (or even source headers) that can let me know of other objects or properties that I may be able to use in my web?

Also (on a related topic) ... is there any way to always display all view categories for a view. If I have a view with three categories:
  • Album Artist (auto) (Grouped)
  • Album Artist (auto)
  • Album
The "Album" link is missed out of web navigation for any artist with only one album. This is (to me) unpredictable behavior and I would want to see the Album page, even if it only has one. Is there an option that lets me do this?

Thanks

Brian
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72443
  • Where did I put my teeth?
Re: Any documentation on web objects?
« Reply #1 on: May 31, 2010, 06:47:18 am »

I hope you'll share when you're finished.

This may not help, but it's the best I can do:
http://wiki.jrmediacenter.com/index.php/Web_Service_Interface
Logged

avid

  • Regular Member
  • World Citizen
  • ***
  • Posts: 180
  • MC user since 2003
Re: Any documentation on web objects?
« Reply #2 on: May 31, 2010, 08:34:58 am »

Thanks Jim,

I had already found that document, and it wasn't what I was looking for. But it might be useful for other stuff.

I would hope that you would plan to document objects like LibraryItem and properties like IntoLink eventually. I can see that it not highest priority why MC15 is developing, but it would be very useful for it to be documented before you consider it "finished".

Meanwhile, is there some way of preventing the skipping of levels of the view hierarchy when there is only a single Album??

Brian
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42376
  • Shoes gone again!
Re: Any documentation on web objects?
« Reply #3 on: June 01, 2010, 10:59:05 am »

Meanwhile, is there some way of preventing the skipping of levels of the view hierarchy when there is only a single Album??

This is something we do in Theater View as well.  An iPod also does it.

Is there a specific case where it's confusing to you?  Before we add a user option, we should think through whether a more sophisticated level skipping algorithm could make everyone happy.

Thanks.

Logged
Matt Ashland, JRiver Media Center

avid

  • Regular Member
  • World Citizen
  • ***
  • Posts: 180
  • MC user since 2003
Re: Any documentation on web objects?
« Reply #4 on: June 01, 2010, 11:21:06 am »

Thanks Matt,

I know that iPod does it that way - I dislike it there too!! But MC is a much more featured player, so I hoped for better  :)

My main interest was finding if there was already a way to control this - in particular to switch it off. Partly it is familiarity and predictability. If I click on an artist name, I expect to drill down into that artist's albums, and then down to tracks, as in the tree in the main view.

Another concern is the "WAF" (Is that term still current in HTPC development, or am I dating myself? "Wife Acceptance Factor" anyway) of the control. I find the WebRemote behavior difficult to justify.

A particular "use case" is:
  • I know I have an album by a particular artist and I can only vaguely remember the album name
  • I want to play the whole album (which is how I tend to listen)
  • I click on the artist name and get taken straight to the list of tracks
  • I realize I must only have that one album by that artist (though still can't tell what it's called)
  • I have to back up to the artist and play all for the artist to get what I want

The sequence just doesn't come naturally to me and is difficult to justify

Does that make sense?

Brian
Logged

avid

  • Regular Member
  • World Citizen
  • ***
  • Posts: 180
  • MC user since 2003
Re: Any documentation on web objects?
« Reply #5 on: June 04, 2010, 12:36:51 pm »

And returning to my first point. I accept that there is no documentation yet on the server-side substitutions, but can you tell me if there is a property of PlayingNowFile(x) which is its FileKey? I have tried the obvious [PlayingNowFile([z]).FileKey], but that doesn't work.

FYI I am trying to make PlayingNowList.html highlight the currently playing track (dynamically) and also to position that current track to be visible when entering the page. A key (like FileKey - an integer) with a simple well-understood format would be ideal for that. The only properties in the example are "Name" and "Artist", neither of which are suitable.

Thanks

Brian

PS - and yes - I will share when it is working for me - maybe by the end of the month.
Logged

avid

  • Regular Member
  • World Citizen
  • ***
  • Posts: 180
  • MC user since 2003
Re: Any documentation on web objects?
« Reply #6 on: June 08, 2010, 12:56:44 am »

An alternative suggestion that might be easier ...

Is there a possibility that .../MCWS/v1/Playback/Info could return two additional values:
  • The index of the current track/file in the playlist
  • The length (number of tracks/files) of the playlist

This means that the web remote can display a "Track X of Y" and it would then become easy to highlight the currently playing track in the PlayingNowList window.

Can I sell you on that idea??  :)

Brian
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42376
  • Shoes gone again!
Re: Any documentation on web objects?
« Reply #7 on: June 08, 2010, 10:23:16 am »

An alternative suggestion that might be easier ...

Is there a possibility that .../MCWS/v1/Playback/Info could return two additional values:
  • The index of the current track/file in the playlist
  • The length (number of tracks/files) of the playlist

This means that the web remote can display a "Track X of Y" and it would then become easy to highlight the currently playing track in the PlayingNowList window.

Can I sell you on that idea??  :)

Brian

In build 56 and later:
Changed: Added PlayingNowPosition, PlayingNowTracks, and PlayingNowPositionDisplay variables to MCWS/v1/Playback/Info function.

Here's an example response:
Code: [Select]
<Response Status="OK">
<Item Name="State">2</Item>
<Item Name="FileKey">5409887</Item>
<Item Name="PositionMS">24300</Item>
<Item Name="DurationMS">238280</Item>
<Item Name="ElapsedTimeDisplay">0:24</Item>
<Item Name="RemainingTimeDisplay">-3:34</Item>
<Item Name="TotalTimeDisplay">3:58</Item>
<Item Name="PositionDisplay">0:24 / 3:58</Item>
<Item Name="PlayingNowPosition">8</Item>
<Item Name="PlayingNowTracks">10</Item>
<Item Name="PlayingNowPositionDisplay">9 of 10</Item>
<Item Name="Bitrate">992</Item>
<Item Name="SampleRate">44100</Item>
<Item Name="Channels">2</Item>
<Item Name="Chapter">0</Item>
<Item Name="Volume">0.08</Item>
<Item Name="VolumeDisplay">8%</Item>
<Item Name="ImageURL">MCWS/v1/File/GetImage?File=5409887</Item>
<Item Name="Artist">Lee Dewyze</Item>
<Item Name="Album">Slumberland</Item>
<Item Name="Name">Sweet Sweet</Item>
<Item Name="Status">Playing</Item>
</Response>
Logged
Matt Ashland, JRiver Media Center

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42376
  • Shoes gone again!
Re: Any documentation on web objects?
« Reply #8 on: June 08, 2010, 10:27:21 am »

And returning to my first point. I accept that there is no documentation yet on the server-side substitutions, but can you tell me if there is a property of PlayingNowFile(x) which is its FileKey? I have tried the obvious [PlayingNowFile([z]).FileKey], but that doesn't work.

Also in build 56:
Changed: Added .FileKey variable for WebPlay / WebRemote file objects.
Logged
Matt Ashland, JRiver Media Center

avid

  • Regular Member
  • World Citizen
  • ***
  • Posts: 180
  • MC user since 2003
Re: Any documentation on web objects?
« Reply #9 on: June 08, 2010, 11:02:11 am »

Thank you for the quick implementation. But now I have to choose which to use of the two additions I asked for!!  ;D

And the PlayingNowPositionDisplay is a useful addition as most people would want a 1-based display, whereas I am assuming that the position is a zero-based index.

Brian
Logged
Pages: [1]   Go Up