From 349bb987049eac94867c6a556449b57ca4674546 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Thu, 22 Sep 2011 12:22:14 +0200 Subject: piano: Protocol version bump (v32) Keys stay the same. Quickmix and seed suggestion API calls changed. Listener id is not part of the url any more. Bookmark API calls seem to be deprecated. --- src/ui.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/ui.c') diff --git a/src/ui.c b/src/ui.c index 0f74c2b..dc2acb3 100644 --- a/src/ui.c +++ b/src/ui.c @@ -466,11 +466,13 @@ PianoArtist_t *BarUiSelectArtist (BarApp_t *app, PianoArtist_t *startArtist) { /* search music: query, search request, return music id * @param app handle - * @param allow seed suggestions if != NULL + * @param seed suggestion station + * @param seed suggestion musicid * @param prompt string * @return musicId or NULL on abort/error */ -char *BarUiSelectMusicId (BarApp_t *app, char *similarToId, const char *msg) { +char *BarUiSelectMusicId (BarApp_t *app, PianoStation_t *station, + PianoSong_t *similarSong, const char *msg) { char *musicId = NULL; char lineBuf[100], selectBuf[2]; PianoSearchResult_t searchResult; @@ -480,12 +482,14 @@ char *BarUiSelectMusicId (BarApp_t *app, char *similarToId, const char *msg) { BarUiMsg (&app->settings, MSG_QUESTION, msg); if (BarReadlineStr (lineBuf, sizeof (lineBuf), &app->input, BAR_RL_DEFAULT) > 0) { - if (strcmp ("?", lineBuf) == 0 && similarToId != NULL) { + if (strcmp ("?", lineBuf) == 0 && station != NULL && + similarSong != NULL) { PianoReturn_t pRet; WaitressReturn_t wRet; PianoRequestDataGetSeedSuggestions_t reqData; - reqData.musicId = similarToId; + reqData.station = station; + reqData.musicId = similarSong->musicId; reqData.max = 20; BarUiMsg (&app->settings, MSG_INFO, "Receiving suggestions... "); -- cgit v1.2.3