INTERACT FORUM

Please login or register.

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

Author Topic: [MCWS] Question regarding playlist serialization  (Read 732 times)

DrKNo

  • World Citizen
  • ***
  • Posts: 201
[MCWS] Question regarding playlist serialization
« on: August 18, 2020, 08:47:01 am »

I'm currently implementing methods for dealing with playlists in pymcws. Some of this, for example Playback/SetPlaylist take a serialized playlist as an argument. The documentation is not really helpful here - somewhere it's noted that it's just a list of keys, but comma separating keys didn't work for me (MCWS returned 200 OK, but didn't do anything).

After some trial and error and getting example values form files/search, I figured out that it expects a list of semicolon separated values, where the first three values have a special meaning. And this is my question.
  • Value one seems to be "2" in all examples I found. What does it indicate? What are other options?
  • Value two seem to be the number of keys in the list
  • Value three is mostly -1 or positive, I believe that is the active item in the list?


So, what is the first value?
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10939
Re: [MCWS] Question regarding playlist serialization
« Reply #1 on: August 18, 2020, 09:45:05 am »

SetPlaylist is really mostly for internal use. The "2" is the version, only 2 is being accepted at this point. The other you got right already, its count and position (or -1 for none).
Logged
~ nevcairiel
~ Author of LAV Filters

DrKNo

  • World Citizen
  • ***
  • Posts: 201
Re: [MCWS] Question regarding playlist serialization
« Reply #2 on: August 18, 2020, 10:00:24 am »

Thank you, Hendrik! Should I use another call to set the playlist without stating playback?
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10939
Re: [MCWS] Question regarding playlist serialization
« Reply #3 on: August 18, 2020, 10:29:02 am »

It's fine, the playlist structure is simple enough.
Logged
~ nevcairiel
~ Author of LAV Filters
Pages: [1]   Go Up