- # PINES ISBN
- if ( C4::Context->preference('PINESISBN') ) {
- my $url = "http://www.librarything.com/api/thingISBN/".$isbn;
- $gapines_response = _get_url($url,'thingisbn');
+ $response->{isbn} = [ @{ $xisbn_response->{isbn} or [] }, @{ $syndetics_response->{isbn} or [] }, @{ $thing_response->{isbn} or [] } ];
+ my @xisbns;
+ my $unique_xisbns; # a hashref
+
+ # loop through each ISBN and scope to the local collection
+ for my $response_data( @{ $response->{ isbn } } ) {
+ next if $response_data->{'content'} eq $isbn;
+ next if $isbn eq $response_data;
+ next if $unique_xisbns->{ $response_data->{content} };
+ $unique_xisbns->{ $response_data->{content} }++;
+ my $xbiblio= _get_biblio_from_xisbn($response_data->{content});
+ push @xisbns, $xbiblio if $xbiblio;