Skip to content
Snippets Groups Projects
Commit d9f4058b authored by Laurent's avatar Laurent
Browse files

fix lastfm integration

parent 7a908d75
Branches
Tags
2 merge requests!3297WIP: Master,!3182hotline #82630 add record deduplication on 010 per integration site
Pipeline #7908 passed with stage
in 38 minutes and 17 seconds
......@@ -128,12 +128,13 @@ class Class_WebService_Lastfm extends Class_WebService_Abstract {
public function getMorceaux($titre, $auteur) {
$album=$this->getAlbum($titre,$auteur);
if(!$album) return false;
if (!$album = $this->getAlbum($titre,$auteur))
return false;
$data = $this->httpGet($album['url']);
$dom = new Zend_Dom_Query($data);
$elements = $dom->queryXpath('//td[@class="chartlist-name"]//span/a');
$elements = $dom->queryXpath('//td[@class="chartlist-name"]/a');
if (!$elements->count())
return ['nb_resultats' => 0];
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment