diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2012-04-27 15:15:40 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2012-05-01 11:04:50 +0200 |
commit | 63c86dce1e248aa03a99792f56077dc176bcd295 (patch) | |
tree | e702be797a6e1b84f780dc6bf3fab504eb853d71 /src/ui.c | |
parent | bd9291bfc016a5f16fd81495dbe779b47627ade0 (diff) | |
download | pianobar-63c86dce1e248aa03a99792f56077dc176bcd295.tar.gz pianobar-63c86dce1e248aa03a99792f56077dc176bcd295.tar.bz2 pianobar-63c86dce1e248aa03a99792f56077dc176bcd295.zip |
piano: Move to JSON API (v5)
In random order: Thanks to Chris Eby for his work on pithos, to an
anonymous coward for sending me his Android client, to Alex Howard for
sending me the webOS client, to ZigZagJoe for providing a temporary fix
and thanks to everyone who sent Pandora a message.
Although there are a few rough edges here and there this fixes #236.
Diffstat (limited to 'src/ui.c')
-rw-r--r-- | src/ui.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -138,7 +138,7 @@ void BarUiMsg (const BarSettings_t *settings, const BarUiMsg_t type, */ static WaitressReturn_t BarPianoHttpRequest (WaitressHandle_t *waith, PianoRequest_t *req, bool forceTls) { - waith->extraHeaders = "Content-Type: text/xml\r\n"; + waith->extraHeaders = "Content-Type: text/plain\r\n"; waith->postData = req->postData; waith->method = WAITRESS_METHOD_POST; waith->url.path = req->urlPath; @@ -186,7 +186,7 @@ int BarUiPianoCall (BarApp_t * const app, PianoRequestType_t type, *pRet = PianoResponse (&app->ph, &req); if (*pRet != PIANO_RET_CONTINUE_REQUEST) { /* checking for request type avoids infinite loops */ - if (*pRet == PIANO_RET_AUTH_TOKEN_INVALID && + if (*pRet == PIANO_RET_P_INVALID_AUTH_TOKEN && type != PIANO_REQUEST_LOGIN) { /* reauthenticate */ PianoReturn_t authpRet; |