fuck it, just do it in the blade template instead
This commit is contained in:
parent
288fe04e95
commit
49f9f7fd3c
3 changed files with 12 additions and 15 deletions
|
|
@ -8,21 +8,11 @@
|
|||
|
||||
class LastFMCurrent extends Component {
|
||||
public $track;
|
||||
public $artUrl;
|
||||
/**
|
||||
* Create a new component instance.
|
||||
*/
|
||||
public function __construct($track) {
|
||||
$this->track = $track;
|
||||
$this->artUrl = null;
|
||||
if (isLegacy()) {
|
||||
$path = parse_url($track["image"], PHP_URL_PATH);
|
||||
if ($track["image"] !== "") {
|
||||
$this->artUrl = "//" . request()->getHttpHost() . "/proxy/lastfm/" . basename($path);
|
||||
}
|
||||
} else {
|
||||
$this->artUrl = $track["image"];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue