Zend Framework

Zend_Service_Amazon tracklist fetching

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4
  • Fix Version/s: 1.7.6
  • Component/s: Zend_Service_Amazon
  • Labels:
    None

Description

Fetching tracklist from Amazon search is not working properly when product (album) has more than 1 disc.

require_once 'Zend/Service/Amazon/Query.php';
$query = new Zend_Service_Amazon_Query('XXXXXXXXXXXX','UK');
$query->Category('Blended')->Keywords("5036742001123")->ResponseGroup('Tracks,Small,Medium,ItemAttributes');
$results = $query->search();
Zend_Debug::dump($results->current()->Tracks);

outputs:

array(1) {
  [""] => string(14) "Rock Tha House"
}

output should be:

array(2) {
  [1] => array(11) {
    [0] => string(12) "Ressurection"
    [1] => string(6) "Creeps"
    [2] => string(15) "White lightning"
    [3] => string(14) "Check-out Time"
    [4] => string(6) "Pacman"
    [5] => string(9) "Reach out"
    [6] => string(7) "Syringe"
    [7] => string(14) "Rock Tha House"
    [8] => string(5) "Greed"
    [9] => string(10) "Flightpath"
    [10] => string(8) "Fastlane"
  }
  [2] => array(13) {
    [0] => string(6) "Creeps"
    [1] => string(10) "Flightpath"
    [2] => string(12) "Ressurection"
    [3] => string(9) "Reach out"
    [4] => string(7) "Syringe"
    [5] => string(14) "Check out time"
    [6] => string(15) "White lightning"
    [7] => string(6) "Pacman"
    [8] => string(5) "Greed"
    [9] => string(11) "Bleep bleep"
    [10] => string(12) "Kerb crawler"
    [11] => string(8) "Fastlane"
    [12] => string(14) "Rock Tha House"
  }
}

To resolve this problem:
Line 156 in file Zend/Service/Amazon/Item.php is

$this->Tracks[$disk->getAttribute('number')] = (string) $t->data;

But it should be
$this->Tracks[$disk->getAttribute('Number')][] = (string) $t->data;

Activity

Hide
Matthew Weier O'Phinney added a comment -

Assigning to Jon Whitcraft.

Show
Matthew Weier O'Phinney added a comment - Assigning to Jon Whitcraft.
Hide
Jon Whitcraft added a comment -

I am not seeing that code in the Zend/Service/Amazon/Item.php file. Can you tell me what version of ZF you are using? You can check in the Zend/Version.php file.

The latest trunk file has this on like 156

require_once 'Zend/Service/Amazon/Image.php';
Show
Jon Whitcraft added a comment - I am not seeing that code in the Zend/Service/Amazon/Item.php file. Can you tell me what version of ZF you are using? You can check in the Zend/Version.php file. The latest trunk file has this on like 156
require_once 'Zend/Service/Amazon/Image.php';
Hide
Timo Vildersen added a comment -

Version 1.7.5 ... downloaded few days ago.

And line 156 in Zend/Service/Amazon/Item.php IS

$this->Tracks[$disk->getAttribute('number')] = (string) $t->data;

I can't look what's in trunk ... Code Browser is down at the moment

Show
Timo Vildersen added a comment - Version 1.7.5 ... downloaded few days ago. And line 156 in Zend/Service/Amazon/Item.php IS
$this->Tracks[$disk->getAttribute('number')] = (string) $t->data;
I can't look what's in trunk ... Code Browser is down at the moment
Hide
Jon Whitcraft added a comment -

Trunk has a lot of other fixes in it that was the release branch has. I'm looking into why the trunk never got synced to the release branch on these fixes.

Show
Jon Whitcraft added a comment - Trunk has a lot of other fixes in it that was the release branch has. I'm looking into why the trunk never got synced to the release branch on these fixes.
Hide
Jon Whitcraft added a comment -

These have been merged into the release branch (r14126) and will come out with the next release.

Show
Jon Whitcraft added a comment - These have been merged into the release branch (r14126) and will come out with the next release.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: