Compare commits
2 commits
800898153d
...
02ffd3a183
| Author | SHA1 | Date | |
|---|---|---|---|
|
02ffd3a183 |
|||
|
288fe04e95 |
4 changed files with 252 additions and 208 deletions
|
|
@ -8,21 +8,11 @@
|
||||||
|
|
||||||
class LastFMCurrent extends Component {
|
class LastFMCurrent extends Component {
|
||||||
public $track;
|
public $track;
|
||||||
public $artUrl;
|
|
||||||
/**
|
/**
|
||||||
* Create a new component instance.
|
* Create a new component instance.
|
||||||
*/
|
*/
|
||||||
public function __construct($track) {
|
public function __construct($track) {
|
||||||
$this->track = $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"];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
435
composer.lock
generated
435
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'name' => env('APP_NAME', 'wah.moe'),
|
'name' => env('APP_NAME', 'wah.moe'),
|
||||||
'version' => '2025.08.30-patch0',
|
'version' => '2025.08.30-patch1',
|
||||||
'env' => env('APP_ENV', 'production'),
|
'env' => env('APP_ENV', 'production'),
|
||||||
'debug' => (bool) env('APP_DEBUG', false),
|
'debug' => (bool) env('APP_DEBUG', false),
|
||||||
'url' => env('APP_URL', 'http://localhost'),
|
'url' => env('APP_URL', 'http://localhost'),
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,14 @@
|
||||||
@if (isLegacy())
|
@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>
|
<table border="0" cellpadding="0" cellspacing="0"><tr>
|
||||||
@if (isset($artUrl))
|
@if (isset($artUrl))
|
||||||
<td><img src="{{ $artUrl }}" alt="Album cover for {{ $track["title"] }} by {{ $track["artist"] }}"></td>
|
<td><img src="{{ $artUrl }}" alt="Album cover for {{ $track["title"] }} by {{ $track["artist"] }}" border="1"></td>
|
||||||
@endif
|
@endif
|
||||||
<td width="10px"> </td>
|
<td width="10px"> </td>
|
||||||
<td>
|
<td>
|
||||||
|
|
@ -13,9 +20,9 @@
|
||||||
<br>
|
<br>
|
||||||
@else
|
@else
|
||||||
<div class="current-track">
|
<div class="current-track">
|
||||||
@if (isset($artUrl))
|
@if($track["image"] !== "")
|
||||||
<div>
|
<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>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue