INTERACT FORUM

Please login or register.

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

Author Topic: Just a shout out for the MCWS api  (Read 1111 times)

dhiggins

  • Regular Member
  • World Citizen
  • ***
  • Posts: 126
Just a shout out for the MCWS api
« on: January 14, 2018, 11:27:21 am »

The more I play with the MCWS, the more I like it.

I was experimenting with using a Raspberry PI to drive an el cheapo digital picture frame. My first thought was "Rats, I have to build up something that can iterate through all my files on a server and grab random files...etc, etc"

Then, I realized I already have MC running on the server.

Soooo.

Grab a play list ID for a play list that's a set of images
http://server:8080/MCWS/v1/Playlists/List

then grab the play list files list, and use the shuffle arg to shuffle them
http://server:8080/MCWS/v1/Playlist/Files?Playlist=41776729&PlaylistType=ID&Action=serialize&shuffle=1

Strip off the first 3 args in the list.

Grab the next item (the file ID of the first file in the list, that's random because the list was just shuffled)

Then use the GETFILE function  to get that file.
http://server:8080/MCWS/v1/File/GetFile?File=78536

and display the file on the picframe.

JRiver just made this little project a WHOLE LOT easier<G>

And I can change up what images get shown just by editing the Playlist used.

Anyway, Kudos!!

Just wanted to say thanks.
Darin
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41990
  • Shoes gone again!
Re: Just a shout out for the MCWS api
« Reply #1 on: January 14, 2018, 11:33:16 am »

Thanks!
Logged
Matt Ashland, JRiver Media Center

cncb

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2929
Re: Just a shout out for the MCWS api
« Reply #2 on: January 15, 2018, 08:25:26 am »

I agree.  It is nicely done.
Logged
-Craig    MO 4Media remote and player:  Android/TV/Auto | iOS | Windows 10/UWP
Pages: [1]   Go Up