Compare commits
8 commits
v2025.08.3
...
master
Author | SHA1 | Date | |
---|---|---|---|
fd82adc73e |
|||
49f9f7fd3c |
|||
288fe04e95 |
|||
800898153d |
|||
79d8294ba1 |
|||
c89bf3bf1a |
|||
ce45727b60 |
|||
7ba32186cf |
7 changed files with 255 additions and 212 deletions
|
@ -25,7 +25,7 @@ public function getCurrentTrack() {
|
|||
$data = $response->json();
|
||||
$track_data = $data["recenttracks"]["track"][0];
|
||||
// $image = array_column($track_data["image"], null, 'size')['large'] ?? false;
|
||||
$image = $track_data["image"][(array_key_last($track_data["image"]))] ?? false;
|
||||
$image = end($track_data["image"]) ?? false;
|
||||
$now_playing = false;
|
||||
if (array_key_exists("@attr", $track_data)) {
|
||||
$now_playing = $track_data["@attr"]["nowplaying"] == "true" ?? ["url"=>null];
|
||||
|
|
|
@ -29,7 +29,7 @@ public static function insertGuestbookEntry(Request $request) {
|
|||
}
|
||||
|
||||
public static function selectEntries() {
|
||||
$entries = GuestbookEntry::orderBy('created_at', 'desc')->get();
|
||||
$entries = GuestbookEntry::where("legacy_flagged", false)->orderBy('created_at', 'desc')->get();
|
||||
return $entries;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,22 +8,11 @@
|
|||
|
||||
class LastFMCurrent extends Component {
|
||||
public $track;
|
||||
public $artUrl;
|
||||
/**
|
||||
* Create a new component instance.
|
||||
*/
|
||||
public function __construct($track) {
|
||||
$this->track = $track;
|
||||
if (isLegacy()) {
|
||||
$path = parse_url($track["image"], PHP_URL_PATH);
|
||||
if ($track["image"] === "") {
|
||||
$this->artUrl = null;
|
||||
return;
|
||||
}
|
||||
$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 [
|
||||
'name' => env('APP_NAME', 'wah.moe'),
|
||||
'version' => '2025.08.30',
|
||||
'version' => '2025.08.30-patch2',
|
||||
'env' => env('APP_ENV', 'production'),
|
||||
'debug' => (bool) env('APP_DEBUG', false),
|
||||
'url' => env('APP_URL', 'http://localhost'),
|
||||
|
|
|
@ -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 ($artUrl !== null)
|
||||
<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
|
||||
<td width="10px"> </td>
|
||||
<td>
|
||||
|
@ -13,9 +20,11 @@
|
|||
<br>
|
||||
@else
|
||||
<div class="current-track">
|
||||
@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>
|
||||
<h2>{{ $track["header"] }}:</h2>
|
||||
<a href="{{ $track["url"] }}"><font color="#000000">{{ $track["title"] }}</font></a><br>
|
||||
|
|
|
@ -66,8 +66,6 @@
|
|||
<font size="+2"><b>Entries ({{ count($entries) }} total)</b></font>
|
||||
<table cellspacing="10" cellpadding="0" border="0">
|
||||
@foreach ($entries as $entry)
|
||||
{{-- Skip entries flagged as legacy --}}
|
||||
@if($entry->legacy_flagged) @php continue @endphp @endif
|
||||
@php
|
||||
$user_agent = $parser->parse($entry->agent);
|
||||
@endphp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue