comparison src/scrobbler/scrobbler.c @ 1026:ff0487e9d00d trunk

[svn] - first attempt at implementing AudioScrobbler 1.2 protocol
author nenolod
date Fri, 11 May 2007 22:49:11 -0700
parents 238055a6cb8f
children b5de3b4129a6
comparison
equal deleted inserted replaced
1025:b70103d4b5ba 1026:ff0487e9d00d
17 17
18 #define SCROBBLER_HS_URL "http://post.audioscrobbler.com" 18 #define SCROBBLER_HS_URL "http://post.audioscrobbler.com"
19 #define SCROBBLER_CLI_ID "aud" 19 #define SCROBBLER_CLI_ID "aud"
20 #define SCROBBLER_HS_WAIT 1800 20 #define SCROBBLER_HS_WAIT 1800
21 #define SCROBBLER_SB_WAIT 10 21 #define SCROBBLER_SB_WAIT 10
22 #define SCROBBLER_VERSION "1.1" 22 #define SCROBBLER_VERSION "1.2"
23 #define SCROBBLER_IMPLEMENTATION "0.1" /* This is the implementation, not the player version. */ 23 #define SCROBBLER_IMPLEMENTATION "0.1" /* This is the implementation, not the player version. */
24 #define SCROBBLER_SB_MAXLEN 1024 24 #define SCROBBLER_SB_MAXLEN 1024
25 #define CACHE_SIZE 1024 25 #define CACHE_SIZE 1024
26 26
27 /* Scrobblerbackend for xmms plugin, first draft */ 27 /* Scrobblerbackend for xmms plugin, first draft */
642 memset(sc_curl_errbuf, 0, sizeof(sc_curl_errbuf)); 642 memset(sc_curl_errbuf, 0, sizeof(sc_curl_errbuf));
643 curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, sc_curl_errbuf); 643 curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, sc_curl_errbuf);
644 curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1); 644 curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
645 curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, SC_CURL_TIMEOUT); 645 curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, SC_CURL_TIMEOUT);
646 646
647 /*
648 curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1); 647 curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
649 curl_easy_setopt(curl, CURLOPT_TIMEOUT, SCROBBLER_SB_WAIT); 648 curl_easy_setopt(curl, CURLOPT_TIMEOUT, SCROBBLER_SB_WAIT);
650 */
651 649
652 status = curl_easy_perform(curl); 650 status = curl_easy_perform(curl);
653 651
654 curl_easy_cleanup(curl); 652 curl_easy_cleanup(curl);
655 653