@extends('layouts.default') @section('title', 'Music') @section('description', '') @section('content') @php $cfg = app('config')->get('services')['lastfm']; $api_root = app('config')->get('app')['api_root']; $api_alive = true; try { $data = file_get_contents($api_root.'/lastfm/current'); } catch (Exception $e) { $api_alive = false; } @endphp @if (!$api_alive) @include('components.errors.api-error') @else @php $current_track = json_decode(file_get_contents($api_root . '/lastfm/current')); $top_tracks = json_decode(file_get_contents($api_root . '/lastfm/top')); $count = 0; @endphp
Last/Current Track: |
|||
{{ $current_track->title }} • {{ $current_track->artist }} |
|||
|
|||
Top {{ $cfg['toptracks'] }} Tracks (Last 7 days) |
|||
# | Track | Artist | Plays |
{{ $count }} | {{ $track->playcount }} |