INTERACT FORUM

Please login or register.

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

Author Topic: MCWS Questions  (Read 2733 times)

mpg732

  • Junior Woodchuck
  • **
  • Posts: 96
MCWS Questions
« on: February 18, 2023, 09:49:58 am »

I have been playing around with creating controls for MC in Demopad.  I have the following command http://localhost:52199/MCWS/v1/Playback/Playlist?Zone=-1.  That works and all, but was wondering how and or if it can be done, I would like to limit how much info is returned, IE only Title, artist, duration and son ID#, so is that possible?  I also have a playlist of over 800 songs, that is a lot of returned data to sort through and parse.  I also was wondering if you can get the returned info in the shuffled state that the playlist is currently playing in?  I was also wondering if you can get a limited number of songs, such as give me the first 1 to 50 songs, then next being 51 to 100, and so on?

Thanks
Mike

PS, I have searched the internet for answers but was not able to find answers...
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4269
Re: MCWS Questions
« Reply #1 on: February 18, 2023, 10:04:05 am »

see the doc at http://localhost:52199/MCWS/v1/doc

you'll see there is a parameter

            Fields: The fields to include in an MPL (use empty to include all fields) (set to Calculated to include calculated fields). (default: )

I don't believe there is any pagination built in
Logged

mpg732

  • Junior Woodchuck
  • **
  • Posts: 96
Re: MCWS Questions
« Reply #2 on: February 18, 2023, 03:54:04 pm »

I started there, I guess I don't understand how to do this, that's why I am asking for help.  Can you please give an example command?

Thanks
Mike
Logged

mpg732

  • Junior Woodchuck
  • **
  • Posts: 96
Re: MCWS Questions
« Reply #3 on: February 18, 2023, 04:30:10 pm »

So kinda got it working with the following line,
http://localhost:52199/MCWS/v1/Playback/Playlist?Fields=Key,Name,Artist,Duration?Zone=-1

Can not get Duration to show up in the returned data
Logged

retiredteacherguy

  • World Citizen
  • ***
  • Posts: 108
Logged

mpg732

  • Junior Woodchuck
  • **
  • Posts: 96
Re: MCWS Questions
« Reply #5 on: February 18, 2023, 07:03:55 pm »

Thanks got that part figured out,
http://localhost:52199/MCWS/v1/Playback/Playlist?Action=JSON&ActiveFileOnly=1&Fields=Key,Name,Artist

is it possible to split up how much I que, like 1 to 50 then 51 to 100, so on and so on
Logged

retiredteacherguy

  • World Citizen
  • ***
  • Posts: 108
Re: MCWS Questions
« Reply #6 on: February 19, 2023, 05:51:32 am »

Maybe if you explain your end goal you’ll get some other responses
Logged

eve

  • Citizen of the Universe
  • *****
  • Posts: 689
Re: MCWS Questions
« Reply #7 on: February 20, 2023, 01:19:46 am »

This Centro stuff looks pretty cool.

Thanks for mentioning it!
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4269
Re: MCWS Questions
« Reply #8 on: February 20, 2023, 01:27:14 am »

is it possible to split up how much I que, like 1 to 50 then 51 to 100, so on and so on
no
Logged

eve

  • Citizen of the Universe
  • *****
  • Posts: 689
Re: MCWS Questions
« Reply #9 on: February 20, 2023, 04:01:43 am »

Thanks got that part figured out,
http://localhost:52199/MCWS/v1/Playback/Playlist?Action=JSON&ActiveFileOnly=1&Fields=Key,Name,Artist

is it possible to split up how much I que, like 1 to 50 then 51 to 100, so on and so on

There's no built in pagination. You *can* sort of work around this by 'getting' all relevant items, storing that list, and splitting it yourself. You can send multiple requests to JRiver that append items to the end of the queue. What are you trying to achieve exactly with the pagination?
800 items isn't ridiculous to parse and sort from a computational perspective.
Logged

mpg732

  • Junior Woodchuck
  • **
  • Posts: 96
Re: MCWS Questions
« Reply #10 on: February 20, 2023, 04:43:42 pm »

Thanks all, I have a few different ways of going about it, just seeing all my options before I dive into what I am trying to accomplish. 
Logged
Pages: [1]   Go Up