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
|
|
@ -1,7 +1,14 @@
|
|||
@if (isLegacy())
|
||||
@php
|
||||
$artUrl = null;
|
||||
$path = parse_url($track["image"], PHP_URL_PATH);
|
||||
if ($track["image"] !== "") {
|
||||
$artUrl = "//" . request()->getHttpHost() . "/proxy/lastfm/" . basename($path);
|
||||
}
|
||||
@endphp
|
||||
<table border="0" cellpadding="0" cellspacing="0"><tr>
|
||||
@if (isset($artUrl))
|
||||
<td><img src="{{ $artUrl }}" alt="Album cover for {{ $track["title"] }} by {{ $track["artist"] }}"></td>
|
||||
@if ($artUrl !== null)
|
||||
<td><img src="{{ $artUrl }}" alt="Album cover for {{ $track["title"] }} by {{ $track["artist"] }}" border="1"></td>
|
||||
@endif
|
||||
<td width="10px"> </td>
|
||||
<td>
|
||||
|
|
@ -13,9 +20,9 @@
|
|||
<br>
|
||||
@else
|
||||
<div class="current-track">
|
||||
@if (isset($artUrl))
|
||||
@if($track["image"] !== "")
|
||||
<div>
|
||||
<img src="{{ $artUrl }}" alt="Album cover for {{ $track["title"] }} by {{ $track["artist"] }}">
|
||||
<img src="{{ $track["image"] }}" alt="Album cover for {{ $track["title"] }} by {{ $track["artist"] }}">
|
||||
</div>
|
||||
@endif
|
||||
<div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue