Merge branch '0.6.x'
This commit is contained in:
4
NEWS
4
NEWS
@@ -31,6 +31,10 @@ ncmpcpp-0.7 (????-??-??)
|
|||||||
* Value of 'visualizer_sync_interval' is now restricted to be greater than 9.
|
* Value of 'visualizer_sync_interval' is now restricted to be greater than 9.
|
||||||
* Output of the visualizer now scales automatically as long as 'visualizer_sample_multiplier' is set to 1.
|
* Output of the visualizer now scales automatically as long as 'visualizer_sample_multiplier' is set to 1.
|
||||||
|
|
||||||
|
ncmpcpp-0.6.6 (2015-09-07)
|
||||||
|
* A typo in the example configuration file was fixed.
|
||||||
|
* Fetching lyrics from lyricwiki.com was fixed.
|
||||||
|
|
||||||
ncmpcpp-0.6.5 (2015-07-05)
|
ncmpcpp-0.6.5 (2015-07-05)
|
||||||
|
|
||||||
* Description of mouse wheel usage on volume is now correct.
|
* Description of mouse wheel usage on volume is now correct.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
AC_INIT(configure.ac)
|
AC_INIT(configure.ac)
|
||||||
|
|
||||||
AC_CONFIG_HEADERS(config.h)
|
AC_CONFIG_HEADERS(config.h)
|
||||||
AM_INIT_AUTOMAKE(ncmpcpp, 0.7_pre)
|
AM_INIT_AUTOMAKE(ncmpcpp, 0.7_dev)
|
||||||
|
|
||||||
AC_PREREQ(2.59)
|
AC_PREREQ(2.59)
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
## Multiply received samples by given value. Very
|
## Multiply received samples by given value. Very
|
||||||
## useful for proper visualization of quiet music.
|
## useful for proper visualization of quiet music.
|
||||||
##
|
##
|
||||||
#visualizer_sample_multipler = 1
|
#visualizer_sample_multiplier = 1
|
||||||
#
|
#
|
||||||
##
|
##
|
||||||
## Note: Below parameter defines how often ncmpcpp
|
## Note: Below parameter defines how often ncmpcpp
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CURLcode Curl::perform(std::string &data, const std::string &URL, const std::string &referer, unsigned timeout)
|
CURLcode Curl::perform(std::string &data, const std::string &URL, const std::string &referer, bool follow_redirect, unsigned timeout)
|
||||||
{
|
{
|
||||||
CURLcode result;
|
CURLcode result;
|
||||||
CURL *c = curl_easy_init();
|
CURL *c = curl_easy_init();
|
||||||
@@ -45,6 +45,8 @@ CURLcode Curl::perform(std::string &data, const std::string &URL, const std::str
|
|||||||
curl_easy_setopt(c, CURLOPT_CONNECTTIMEOUT, timeout);
|
curl_easy_setopt(c, CURLOPT_CONNECTTIMEOUT, timeout);
|
||||||
curl_easy_setopt(c, CURLOPT_NOSIGNAL, 1);
|
curl_easy_setopt(c, CURLOPT_NOSIGNAL, 1);
|
||||||
curl_easy_setopt(c, CURLOPT_USERAGENT, "ncmpcpp " VERSION);
|
curl_easy_setopt(c, CURLOPT_USERAGENT, "ncmpcpp " VERSION);
|
||||||
|
if (follow_redirect)
|
||||||
|
curl_easy_setopt(c, CURLOPT_FOLLOWLOCATION, 1L);
|
||||||
if (!referer.empty())
|
if (!referer.empty())
|
||||||
curl_easy_setopt(c, CURLOPT_REFERER, referer.c_str());
|
curl_easy_setopt(c, CURLOPT_REFERER, referer.c_str());
|
||||||
result = curl_easy_perform(c);
|
result = curl_easy_perform(c);
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
namespace Curl
|
namespace Curl
|
||||||
{
|
{
|
||||||
CURLcode perform(std::string &data, const std::string &URL, const std::string &referer = "", unsigned timeout = 10);
|
CURLcode perform(std::string &data, const std::string &URL, const std::string &referer = "", bool follow_redirect = false, unsigned timeout = 10);
|
||||||
|
|
||||||
std::string escape(const std::string &s);
|
std::string escape(const std::string &s);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ LyricsFetcher::Result LyricwikiFetcher::fetch(const std::string &artist, const s
|
|||||||
result.first = false;
|
result.first = false;
|
||||||
|
|
||||||
std::string data;
|
std::string data;
|
||||||
CURLcode code = Curl::perform(data, result.second);
|
CURLcode code = Curl::perform(data, result.second, "", true);
|
||||||
|
|
||||||
if (code != CURLE_OK)
|
if (code != CURLE_OK)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user