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

fix lastfm integration

parent 5b86c7a2
No related merge requests found
Pipeline #7903 failed with stage
in 37 minutes and 18 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