Satshabad / Queue-api

An API server for the Queue app
0 stars 1 forks source link

Search Results #12

Open fskhalsa opened 11 years ago

fskhalsa commented 11 years ago

Basically everything we just talked about:

Images and listeners in track results (listeners lets Queue show the most relevant result - artist vs track - at the top).

Standard format for results, sticking with the way listens and queue items are already returned:


Search results contains a dictionary with keys for two arrays: 'artistResults', and 'trackResults' (this is how it already is, no change needed).

trackResults contains track result items, which are dictionaries containing:

artistResults contains artist result items, which are dictionaries containing:

Digging in, song contains:

artist, both in artist result and in song contains:

album contains:

As a overall change (including in queue and listens - which this is the same as), we might want to consider the 'images' dictionary in 'song' going into 'album', as that may be more fitting. This would require a change for the other two things (queue and recent tracks) to work, but is probably more logical, and now is probably as good a time as any. Let me know what you think.

Other note - I noticed a few inconsistencies in listens results - mostly stuff like 'mbid' still being there, which maybe you want to remove. I'll log another issue for that though.

Satshabad commented 11 years ago

Digging in, song contains:

name (string)
artist (object)
album (object - may be added to queue items afterwards instead)
images (dictionary of strings - as usual with all four sizes)

Tracks are not returned with an album from LFM's API, so....

we might want to consider the 'images' dictionary in 'song' going into 'album' ...and now is probably as good a time as any

To me this is just rearranging the deck chairs on the titanic. Lets not be overly concerned with being logical and consistent here, let's just stick with our (crappy?) scheme. And now is not an equally good time as any. What if your life depended on that change one day? That would be a better day to do that change. I will not implement anything based on the reason that "I might as well".

I'll work on the rest of the stuff. I understand the importance of keeping this consistent with the /queue endpoint in order to simplify this for any clients.

Satshabad commented 11 years ago

OK tell me if this is satisfactory or not.

Satshabad commented 11 years ago

OK lacking a comment, I'm closing this @fskhalsa

fskhalsa commented 11 years ago

I haven't commented yet because I haven't finished implementing search, so I don't know if it's all good yet. Leave it open.