summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@gmail.com>2008-06-19 17:10:02 +0200
committerLars-Dominik Braun <PromyLOPh@gmail.com>2008-06-19 17:10:02 +0200
commitf6e8245458cb0d32609b64c37e1d0e3ab7d8b741 (patch)
tree55352bdeb683a5cedc6d58c909d1ce6f1f762e2d
parentcc038afd9d9cca3c7eb50b71d133da73fa39f8af (diff)
downloadpianobar-windows-f6e8245458cb0d32609b64c37e1d0e3ab7d8b741.tar.gz
pianobar-windows-f6e8245458cb0d32609b64c37e1d0e3ab7d8b741.tar.bz2
pianobar-windows-f6e8245458cb0d32609b64c37e1d0e3ab7d8b741.zip
Showing real face now.
User agent is now PACKAGE_STRING
-rw-r--r--libpiano/src/const.h2
-rw-r--r--libpiano/src/main.c4
-rw-r--r--src/main.c4
3 files changed, 4 insertions, 6 deletions
diff --git a/libpiano/src/const.h b/libpiano/src/const.h
index dfaca1f..d9dfcf8 100644
--- a/libpiano/src/const.h
+++ b/libpiano/src/const.h
@@ -25,8 +25,6 @@ THE SOFTWARE.
/* constants */
-
-#define PIANO_USERAGENT "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9pre) Gecko/2008051115 Firefox/3.0pre"
#define PIANO_RPC_URL "http://www.pandora.com/radio/xmlrpc/v19?"
#define PIANO_SECURE_RPC_URL "https://www.pandora.com/radio/xmlrpc/v19?"
#define PIANO_URL_BUFFER_SIZE 1024
diff --git a/libpiano/src/main.c b/libpiano/src/main.c
index 0659283..14ff4c6 100644
--- a/libpiano/src/main.c
+++ b/libpiano/src/main.c
@@ -31,6 +31,7 @@ THE SOFTWARE.
#include "http.h"
#include "xml.h"
#include "crypt.h"
+#include "config.h"
/* more "secure" free version; only use this function, not original free ()
* in this library
@@ -60,8 +61,7 @@ void PianoInit (PianoHandle_t *ph) {
ph->curlHandle = curl_easy_init ();
/* FIXME: 64-bit may make this hack useless */
snprintf (ph->routeId, sizeof (ph->routeId), "%07liP", time (NULL)>>8);
- /* at the moment we don't need publicity */
- curl_easy_setopt (ph->curlHandle, CURLOPT_USERAGENT, PIANO_USERAGENT);
+ curl_easy_setopt (ph->curlHandle, CURLOPT_USERAGENT, PACKAGE_STRING);
}
/* free complete search result
diff --git a/src/main.c b/src/main.c
index 89f25b2..c70a6e7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -36,6 +36,7 @@ THE SOFTWARE.
#include "terminal.h"
#include "settings.h"
+#include "config.h"
struct aacPlayer {
/* buffer */
@@ -190,8 +191,7 @@ void *threadPlayUrl (void *data) {
curl_easy_setopt (audioFd, CURLOPT_URL, player->url);
curl_easy_setopt (audioFd, CURLOPT_WRITEFUNCTION, playCurlCb);
curl_easy_setopt (audioFd, CURLOPT_WRITEDATA, player);
- /* at the moment we don't need publicity */
- curl_easy_setopt (audioFd, CURLOPT_USERAGENT, "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9pre) Gecko/2008051115 Firefox/3.0pre");
+ curl_easy_setopt (audioFd, CURLOPT_USERAGENT, PACKAGE_STRING);
curl_easy_perform (audioFd);
free (player->buffer);