From eebc4b34e9f8b23f384205543e94d1278b6e63d5 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sat, 7 Oct 2017 12:02:57 +0200 Subject: piano: Fetch extended attribs for station info We can show the song length in the feedback list now. --- src/libpiano/response.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/libpiano/response.c') diff --git a/src/libpiano/response.c b/src/libpiano/response.c index 48a07db..fcc28b1 100644 --- a/src/libpiano/response.c +++ b/src/libpiano/response.c @@ -639,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); } -- cgit v1.2.3