INTERACT FORUM

Please login or register.

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

Author Topic: HTTP Search Database behavior  (Read 291 times)

bblue

  • Galactic Citizen
  • ****
  • Posts: 307
HTTP Search Database behavior
« on: January 07, 2021, 08:15:00 pm »

Hi, I'm trying to use the Search mode as described in Docs for MCWS Files Search.  Here's an example of the command I'm using:

Code: [Select]
GET /MCWS/v1/Files/Search?query=60s50s70s%20Something%20Good&Zone=10000&Zonetype=ID&Action=Play&NOUI=1&Playmode=NextToPlay HTTP/1.1
Now a couple of questions.

How do you control the scope of the search query?  It seems to default to the entire database.  I am using a specific Playlist in a specific zone, but if I don't construct the search string to include a space separated (#20) list of names including part of the file path in the database, it will search all fields in the entire database.  That's why I include the 60s50s70s part of the path -- because that playlist is entirely in that hierarchy.  How can you control what part of the entire database is searched?  And how would you include a \ backslash in the filename?  I've tried #92 and a couple of others, but it just returns an error.

If only one return is required I must always include a %20 separated list of each word of the entire name and title of the search song.  Any generalities in entry will return in multiple returns, some of which aren't really wanted most of the time.  Can the query accept multiple entries in some way?  It seems not, but I need confirmation of that.

In the command above it returns two matches, and if I have Playmode set to Nexttoplay, It will cue the matches as next to play and shows it in real time in the active playlist (in Playing Now), which is correct.  But apparently Playmode can't do two things.  I'd like it to also return the results of the search in an m3u format to my control program (which is written in Python) so I can log it and the time.

The descriptions of each of the functions 'detailed' in the MCWS doc file are frustratingly terse and one (especially me) has to do a lot of trial and error to make them work.

This is part of a free private stream I have online for friends and acquaintances of mine that enjoy music from the era.  MC is the play engine, with appropriate leveling, processing and speed processing to a virtual pipe to the encoder and then on to the streamer.  There's over 6k songs in the playlist.  MC does a great job in handling the playlist, and the audio is great regardless of what genre you listen to.  Python scripts maintain the song titling to the stream server, and monitors the server for listeners and count.

This piece is to attempt to implement a request mechanism to listeners.

Thanks for any assist.

--Bill
Logged
Pages: [1]   Go Up