diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2012-06-06 21:13:43 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2012-06-09 15:43:43 +0200 |
commit | 524abb97453f2140fcd3a7fa66d9d43851af19e1 (patch) | |
tree | 814e33a0d04137332f5a341721f96d4f8cccc9e2 /src/libpiano/request.c | |
parent | b32348d88f700f4a3b5fb3a95f7ee40336952230 (diff) | |
download | pianobar-524abb97453f2140fcd3a7fa66d9d43851af19e1.tar.gz pianobar-524abb97453f2140fcd3a7fa66d9d43851af19e1.tar.bz2 pianobar-524abb97453f2140fcd3a7fa66d9d43851af19e1.zip |
piano: Select quality instead of audio format
Pandora limited the audio formats we can request explicitly. Don’t rely
on this and use the formats available with the given partner
credentials. Closes #271.
Diffstat (limited to 'src/libpiano/request.c')
-rw-r--r-- | src/libpiano/request.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/libpiano/request.c b/src/libpiano/request.c index 35124f4..871620d 100644 --- a/src/libpiano/request.c +++ b/src/libpiano/request.c @@ -36,34 +36,6 @@ THE SOFTWARE. #include "piano.h" #include "crypt.h" -/* convert audio format id to string - * @param format id - * @return constant string - */ -static const char *PianoAudioFormatToString (PianoAudioFormat_t format) { - switch (format) { - case PIANO_AF_AACPLUS_LO: - return "HTTP_32_AACPLUS"; - break; - - case PIANO_AF_AACPLUS: - return "HTTP_64_AACPLUS"; - break; - - case PIANO_AF_MP3: - return "HTTP_128_MP3"; - break; - - case PIANO_AF_MP3_HI: - return "HTTP_192_MP3"; - break; - - default: - return NULL; - break; - } -} - /* prepare piano request (initializes request type, urlpath and postData) * @param piano handle * @param request structure @@ -156,14 +128,11 @@ PianoReturn_t PianoRequest (PianoHandle_t *ph, PianoRequest_t *req, assert (reqData != NULL); assert (reqData->station != NULL); assert (reqData->station->id != NULL); - assert (reqData->format != PIANO_AF_UNKNOWN); req->secure = true; json_object_object_add (j, "stationToken", json_object_new_string (reqData->station->id)); - json_object_object_add (j, "additionalAudioUrl", - json_object_new_string (PianoAudioFormatToString (reqData->format))); method = "station.getPlaylist"; break; |