Author Topic: [API] MultifieldQuery, getting all Playlists  (Read 3095 times)

snwflake

  • Guest
[Thx for moving!]

Good moring,

I spent probably the last 30 mins wondering, if there is no API function available for getting the current track.
The closest I got, was getting the index of the track in NowPlayingList but that was it...even though I had a number, I couldn't do anything with it.


Edit: NowPlayingList_GetFileProperty did the trick  ::)

The second thing I wanted to ask, was if there (is)/will be any API function to query multiple fields e.g.:

(pseudocode)
Code: json
{
   query: {
      field1: {
         title: "Some Title",
         comparator: "Is"
      },
      field2: {
         artist: "Some Artist",
         comparator: "Contains"
      }
   }
}
Would love see that coming!

I just came across another problem  :-\

I wanted to clear the current NowPlayingList and add an entire album to it. I was hoping to find something like NowPlaying_AddTitle, but what I ended up with was, getting the album, iterating through the tracks and NowPlayingList_QueueNext 'em. Which isn't that bad, but if I, say, wanted to listen to the album random, that wouldn't work.

I guess there would be no way around shoving all those tracks into a new playlist and playing that one instead?


Well...again my brain wasn't fast enough. Just shuffling the track array before queueing it => done.


Yet another problem, HOPEFULLY the last one:

Any chance searching a Playlist by Name, even better, searching playlist by wildcard so that an array of playlist will be returned?


Thanks in advance,
cheers!
Last Edit: March 03, 2017, 02:11:36 PM by snwflake