Commit d9f4058b authored by Laurent's avatar Laurent

fix lastfm integration

parent 7a908d75
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) {
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];
Markdown is supported
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