diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2011-09-22 12:22:14 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2011-09-22 12:24:59 +0200 |
commit | 349bb987049eac94867c6a556449b57ca4674546 (patch) | |
tree | 243ef5fcda1fa3a909fb424d525104b9d29212a4 /src/ui.c | |
parent | 17825f0bca1d946df98e952db16e9480bb6699d8 (diff) | |
download | pianobar-349bb987049eac94867c6a556449b57ca4674546.tar.gz pianobar-349bb987049eac94867c6a556449b57ca4674546.tar.bz2 pianobar-349bb987049eac94867c6a556449b57ca4674546.zip |
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.
Diffstat (limited to 'src/ui.c')
-rw-r--r-- | src/ui.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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... "); |