diff options
author | Michał Cichoń <michcic@gmail.com> | 2018-10-30 13:12:47 +0100 |
---|---|---|
committer | Michał Cichoń <michcic@gmail.com> | 2018-10-30 13:12:47 +0100 |
commit | cb6789b17f81d29c6884c27715c705083e09a5db (patch) | |
tree | d6a47c38ff7dcb937992b15dc3c2d051bb877ac8 /src/libpiano/response.c | |
parent | cd5c65097ecf03480f477e47e0bb706dbf705a21 (diff) | |
parent | 82a13ad77bfcf2c6dc37fe0d1d55f93372db6509 (diff) | |
download | pianobar-windows-master.tar.gz pianobar-windows-master.tar.bz2 pianobar-windows-master.zip |
Merge branch 'release/2018.10.30'HEAD2018.10.30master
Diffstat (limited to 'src/libpiano/response.c')
-rw-r--r-- | src/libpiano/response.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/libpiano/response.c b/src/libpiano/response.c index e37824e..fcc28b1 100644 --- a/src/libpiano/response.c +++ b/src/libpiano/response.c @@ -436,8 +436,13 @@ PianoReturn_t PianoResponse (PianoHandle_t *ph, PianoRequest_t *req) { break; } + case PIANO_REQUEST_ADD_TIRED_SONG: { + PianoSong_t * const song = req->data; + song->rating = PIANO_RATE_TIRED; + break; + } + case PIANO_REQUEST_ADD_SEED: - case PIANO_REQUEST_ADD_TIRED_SONG: case PIANO_REQUEST_SET_QUICKMIX: case PIANO_REQUEST_BOOKMARK_SONG: case PIANO_REQUEST_BOOKMARK_ARTIST: @@ -634,6 +639,11 @@ PianoReturn_t PianoResponse (PianoHandle_t *ph, PianoRequest_t *req) { feedbackSong->rating = getBoolDefault (s, "isPositive", false) ? PIANO_RATE_LOVE : PIANO_RATE_BAN; + json_object *v; + feedbackSong->length = + json_object_object_get_ex (s, "trackLength", &v) ? + json_object_get_int (v) : 0; + info->feedback = PianoListAppendP (info->feedback, feedbackSong); } |