INTERACT FORUM

Please login or register.

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

Author Topic: WebService to start playing a playlist or a smartlist  (Read 1987 times)

Olivierr

  • Member
  • *
  • Posts: 4
WebService to start playing a playlist or a smartlist
« on: March 06, 2017, 04:22:58 pm »

Hello,

I am looking for a webservice call to launch a playlist from my browser.
I have managed to play/pause the existing selected list with the following command:
http://192.168.1.10:52199/MCWS/v1/Playback/PlayPause?Zone=Garage&ZoneType=Name
But when I try:
http://192.168.1.10:52199/MCWS/v1/Playlist/Files?PlaylistType=Name&Playlist=MyPlayList&Action=Play&Zone=Garage&ZoneType=Name
I get an error. I guess I am not using the webservice in the correct way but I have no clue how to fix it.

Could you please give me a hint?  Thanks in advance for your help

Kind regards
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71469
  • Where did I put my teeth?
Re: WebService to start playing a playlist or a smartlist
« Reply #1 on: March 06, 2017, 04:56:35 pm »

You can get MC to display the documentation, with examples, by typing this in your browser.

http://localhost:52199/MCWS/v1/doc
Logged

Olivierr

  • Member
  • *
  • Posts: 4
Re: WebService to start playing a playlist or a smartlist
« Reply #3 on: March 07, 2017, 02:29:29 pm »

Thank you both for your answers.

@JimH, yes I built my http request based on examples I found on the URL you mentionned but unfortunately I did not find one that launch a playlist.

@Matt, I have tried the http request you posted but I get the following error:
<Response Status="Failure" Information="Function 'Playback/PlayPlaylist' not found."/>

It seems the function playback So I am still stuck.

Thanks for your help
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41972
  • Shoes gone again!
Re: WebService to start playing a playlist or a smartlist
« Reply #4 on: March 07, 2017, 03:15:19 pm »

I just tried on my library and it worked great!

This was the URL:
http://localhost:52199/MCWS/v1/Playback/PlayPlaylist?Zone=Mytek&ZoneType=Name&PlaylistType=Path&Playlist=MyPlaylist

Double check your slash direction maybe?

Thanks.
Logged
Matt Ashland, JRiver Media Center

Olivierr

  • Member
  • *
  • Posts: 4
Re: WebService to start playing a playlist or a smartlist
« Reply #5 on: March 07, 2017, 04:11:53 pm »

Hi Matt,

Thank you for your reply. You are right, I made a mistake when adjusting your example to my configuration.
It now works great. Thanks a lot.

Just one more thing. Apparently this logic works only with Playlist but not with Smartlist. Could you please explain how to start a Smartlist from a URL?

Thanks again
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41972
  • Shoes gone again!
Re: WebService to start playing a playlist or a smartlist
« Reply #6 on: March 07, 2017, 04:18:12 pm »

Just one more thing. Apparently this logic works only with Playlist but not with Smartlist. Could you please explain how to start a Smartlist from a URL?

Let me look in the code tomorrow and then follow up.  I would have expected it to work.
Logged
Matt Ashland, JRiver Media Center

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41972
  • Shoes gone again!
Re: WebService to start playing a playlist or a smartlist
« Reply #7 on: March 07, 2017, 04:34:02 pm »

It's actually pulling a smartlist just fine for me.  I made a new smartlist named MyPlaylist1 right next to MyPlaylist.  When I issue the play command on it, it just works great.

Not sure what you might be seeing.
Logged
Matt Ashland, JRiver Media Center
Pages: [1]   Go Up