From 63c86dce1e248aa03a99792f56077dc176bcd295 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Fri, 27 Apr 2012 15:15:40 +0200 Subject: 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. --- src/ui.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ui.c') diff --git a/src/ui.c b/src/ui.c index 4162dce..f13bed5 100644 --- a/src/ui.c +++ b/src/ui.c @@ -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; -- cgit v1.2.3