summaryrefslogtreecommitdiff
path: root/src/libpiano/response.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libpiano/response.c')
-rw-r--r--src/libpiano/response.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libpiano/response.c b/src/libpiano/response.c
index 4b33248..16b17a3 100644
--- a/src/libpiano/response.c
+++ b/src/libpiano/response.c
@@ -209,7 +209,8 @@ PianoReturn_t PianoResponse (PianoHandle_t *ph, PianoRequest_t *req) {
free (song);
continue;
}
- song->audioUrl = strdup (json_object_get_string (json_object_object_get (json_object_object_get (json_object_object_get (s, "audioUrlMap"), "highQuality"), "audioUrl")));
+
+ song->audioUrl = PianoJsonStrdup (s, "additionalAudioUrl");
song->artist = PianoJsonStrdup (s, "artistName");
song->album = PianoJsonStrdup (s, "albumName");
song->title = PianoJsonStrdup (s, "songName");
@@ -217,7 +218,7 @@ PianoReturn_t PianoResponse (PianoHandle_t *ph, PianoRequest_t *req) {
song->stationId = PianoJsonStrdup (s, "stationId");
song->fileGain = json_object_get_double (
json_object_object_get (s, "trackGain"));
- song->audioFormat = PIANO_AF_AACPLUS;
+ song->audioFormat = reqData->format;
switch (json_object_get_int (json_object_object_get (s,
"songRating"))) {
case 1: