diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2012-05-02 17:21:46 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2012-05-02 17:21:46 +0200 |
commit | 951d6206f2837d5985899c5b974690e0076b68c5 (patch) | |
tree | 94f1371346a6d0d0df2b5372569e8d4c4f41b008 /src/libpiano/response.c | |
parent | 524289828bffe46f465dbd574d5f30e3c1ee2f62 (diff) | |
download | pianobar-951d6206f2837d5985899c5b974690e0076b68c5.tar.gz pianobar-951d6206f2837d5985899c5b974690e0076b68c5.tar.bz2 pianobar-951d6206f2837d5985899c5b974690e0076b68c5.zip |
piano: Audio format support
Ask Pandora for audio format requested by user. Closes #244.
Diffstat (limited to 'src/libpiano/response.c')
-rw-r--r-- | src/libpiano/response.c | 5 |
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: |