summaryrefslogtreecommitdiff
path: root/plugins/lastfm
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2012-08-16 20:32:55 +0200
committerGravatar waker <wakeroid@gmail.com>2012-08-16 20:32:55 +0200
commit80d653084cc66ab4043994c6b64d485b9a0272a8 (patch)
tree6c5df30dcb622d62532cf58d536b60ad248cf886 /plugins/lastfm
parentf936dc17363dc6ef9fb518bc5b115b0ae43e8fdc (diff)
added user-agent configuration to gui, vfs_curl and last.fm
Diffstat (limited to 'plugins/lastfm')
-rw-r--r--plugins/lastfm/lastfm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/lastfm/lastfm.c b/plugins/lastfm/lastfm.c
index 1e4fec70..2f542a62 100644
--- a/plugins/lastfm/lastfm.c
+++ b/plugins/lastfm/lastfm.c
@@ -130,6 +130,9 @@ curl_req_send (const char *req, const char *post) {
curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_easy_setopt (curl, CURLOPT_NOSIGNAL, 1);
curl_easy_setopt (curl, CURLOPT_PROGRESSFUNCTION, lfm_curl_control);
+ char ua[100];
+ deadbeef->conf_get_str ("network.http_user_agent", "deadbeef", ua, sizeof (ua));
+ curl_easy_setopt (curl, CURLOPT_USERAGENT, ua);
curl_easy_setopt (curl, CURLOPT_NOPROGRESS, 0);
if (post) {
curl_easy_setopt(curl, CURLOPT_POST, 1);