1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-05 19:41:55 +02:00

Fix Amazon art run

This commit is contained in:
Afterster 2015-02-08 21:42:03 +01:00
parent 97a6384c3f
commit d34e34132d
2 changed files with 3 additions and 7 deletions

View file

@ -148,6 +148,7 @@ class AmazonSearch
// get the proxy config
$options = $this->getProxyConfig();
debug_event('amazon-search-results', 'Amazon request: ' . $url, 5);
// make the request and retrieve the response
$request = Requests::get($url, array(), $options);
$contents = $request->body;

View file

@ -129,7 +129,7 @@ class AmpacheAmazon {
* get_arts
* Returns arts for what we're passed in.
*/
public static function gather_arts($type, $options = array(), $limit = 5) {
public function gather_arts($type, $options = array(), $limit = 5) {
$images = array();
$final_results = array();
@ -146,7 +146,7 @@ class AmpacheAmazon {
// Create the Search Object
$amazon = new AmazonSearch($this->amazon_developer_public_key, $this->amazon_developer_private_api_key, $this->amazon_developer_associate_tag, $this->amazon_base_url);
if (AmpConfig::get('proxy_host') AND AmpConfig::get('proxy_port')) {
if (AmpConfig::get('proxy_host') && AmpConfig::get('proxy_port')) {
$proxyhost = AmpConfig::get('proxy_host');
$proxyport = AmpConfig::get('proxy_port');
$proxyuser = AmpConfig::get('proxy_user');
@ -190,11 +190,6 @@ class AmpacheAmazon {
/* Log this if we're doin debug */
debug_event('amazon-xml',"Searched using " . $options['keyword'] . ", results: " . count($final_results), 5);
// If we've hit our limit
if (!empty($limit) && count($final_results) >= $limit) {
break;
}
/* Foreach through what we've found */
foreach ($final_results as $result) {