find("script[data-tralbum]")->attr("data-tralbum")); $additional = json_decode($document->find("script[type=\"application/ld+json\"]")->text()); $title = $json->current->title; ?> "; echo "" . htmlspecialchars($json->artist) . ": "; echo htmlspecialchars($json->current->title); echo ""; echo "
"; $image = "https://f4.bcbits.com/img/" . $json->art_id . "_4.jpg"; $about = $json->current->about; $description = $additional->inAlbum->albumRelease[0]->additionalProperty; if ($description) $description = current(array_filter($description, fn($property) => $property->name === 'digital_release_description')); if ($description) $description = $description->value; $text = $about ?? $description; echo_sidebar($image, $text); echo "
"; echo "
"; echo "Tracklist"; echo ""; foreach ($json->trackinfo as $track) { $link = $track->title_link; if ($link) { $link = prefix_link($link, "artist"); $link = convert_link($link); }; $duration = round($track->duration); if ($duration) $duration = floor($duration / 60) . ":" . sprintf("%02d", $duration % 60); else $duration = null; echo ""; echo ""; echo ""; echo ""; echo ""; if ($track->file) { $file = $track->file; $file = get_mangled_object_vars($file); $file = end($file); echo ""; echo ""; echo ""; echo ""; }; }; echo "
" . ($track->track_num ?? 1) . "."; if ($link) echo ""; echo $track->title; if ($link) echo ""; echo "" . $duration . "
"; echo ""; echo "
"; echo "
"; $lyrics = $json->current->lyrics; if ($lyrics) { echo "
"; echo "Lyrics"; echo "

" . nl2br($json->current->lyrics) . "

"; echo "
"; }; $recommendations = $document->find(".recommended-album"); echo "
"; echo "Recommendations"; echo "
"; foreach ($recommendations as $recommendation) { $link = convert_link($recommendation->find(".album-link")->attr("href")); $image = convert_link(resize_link($recommendation->find("img")->attr("src"), 3)); $text = $recommendation->attr("data-albumtitle"); $description = "by " . $recommendation->attr("data-artist"); echo_item($link, $image, $text, $description); }; echo "
"; echo "
"; echo "
"; $image = $document->find(".bio-pic a")->attr("href"); $image = resize_link($image, 4); if (isset($additional->publisher->description)) $text = $additional->publisher->description; else $text = null; $links = $document->find("#band-links li a"); echo_sidebar($image, $text, $links); echo "
"; } else { echo "No results."; }; ?>