summaryrefslogtreecommitdiff
path: root/src/libpiano/response.c
diff options
context:
space:
mode:
authorMichał Cichoń <michcic@gmail.com>2018-10-30 13:12:47 +0100
committerMichał Cichoń <michcic@gmail.com>2018-10-30 13:12:47 +0100
commitcb6789b17f81d29c6884c27715c705083e09a5db (patch)
treed6a47c38ff7dcb937992b15dc3c2d051bb877ac8 /src/libpiano/response.c
parentcd5c65097ecf03480f477e47e0bb706dbf705a21 (diff)
parent82a13ad77bfcf2c6dc37fe0d1d55f93372db6509 (diff)
downloadpianobar-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.c12
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);
}