Browse Source

Fix artist biography

Sunny 2 years ago
parent
commit
1b03ff2e19
3 changed files with 3 additions and 3 deletions
  1. 1 1
      elements/sidebar.php
  2. 1 1
      pages/artist.php
  3. 1 1
      pages/release.php

+ 1 - 1
elements/sidebar.php

@@ -3,7 +3,7 @@
     echo "<div class=\"sidebar\">";
 
     if (isset($image)) echo "<img src=\"" . convert_link($image) . "\">";
-    if (!empty($text)) echo "<p>" . nl2br(trim(preg_replace("/\.\.\...more\s*\n\s*$/", "", $text))) . "</p>";
+    if (!empty($text)) echo "<p>" . nl2br(trim($text)) . "</p>";
 
     if ($links->length) echo "<p>";
     foreach ($links as $index => $link) {

+ 1 - 1
pages/artist.php

@@ -45,7 +45,7 @@
   echo "</div>";
 
   $image = $document->find(".bio-pic a")->attr("href");
-  $description = $document->find("#bio-text")->text();
+  $description = $document->find("meta[property=\"og:description\"]")->attr("content");
   $links = $document->find("#band-links li a");
 
   echo_sidebar($image, $description, $links);

+ 1 - 1
pages/release.php

@@ -59,7 +59,7 @@
     echo "</div>";
 
     $image = $document->find(".bio-pic a")->attr("href");
-    $text = $document->find("#bio-text")->text();
+    $text = json_decode($document->find("script[type=\"application/ld+json\"]")->text())->publisher->description;
     $links = $document->find("#band-links li a");
 
     echo_sidebar($image, $text, $links);