Migration to last.fm, removed old spotify api client. FOSRestBundle API serving data driven front end (JWT).

This commit is contained in:
boris committed 2026-02-27 16:52:57 +00:00
1 parent 391ecf1732
commit 56dea097d6
51 files changed
+1749 -844

No files matched your search

+8 -10
View File
@@ -28,11 +28,11 @@
{% endif %}
<h1 class="{{ landing_view ? 'display-6 text-center mb-4' : 'h4 mb-3' }}">Search Albums</h1>
{% if source_value != 'user' and spotifyConfigured is defined and not spotifyConfigured %}
{% if source_value != 'user' and externalConfigured is defined and not externalConfigured %}
<div class="alert alert-info">
Spotify is not configured yet. Results will only include user-created albums.
Last.fm is not configured yet. Results will only include user-created albums.
{% if is_granted('ROLE_ADMIN') %}
<a class="alert-link" href="{{ path('admin_settings') }}">Enter Spotify credentials</a>.
<a class="alert-link" href="{{ path('admin_settings') }}">Enter Last.fm API key</a>.
{% endif %}
</div>
{% endif %}
@@ -51,7 +51,7 @@
<div class="col-sm-3 order-sm-4">
<select class="form-select" name="source">
<option value="all" {{ source_value == 'all' ? 'selected' : '' }}>All sources</option>
<option value="spotify" {{ source_value == 'spotify' ? 'selected' : '' }}>Spotify</option>
<option value="external" {{ source_value == 'external' ? 'selected' : '' }}>Last.fm</option>
<option value="user" {{ source_value == 'user' ? 'selected' : '' }}>User-created</option>
</select>
</div>
@@ -86,7 +86,7 @@
<div class="col-sm-3 order-sm-4">
<select class="form-select" name="source">
<option value="all" {{ source_value == 'all' ? 'selected' : '' }}>All sources</option>
<option value="spotify" {{ source_value == 'spotify' ? 'selected' : '' }}>Spotify</option>
<option value="external" {{ source_value == 'external' ? 'selected' : '' }}>Last.fm</option>
<option value="user" {{ source_value == 'user' ? 'selected' : '' }}>User-created</option>
</select>
</div>
@@ -115,7 +115,7 @@
{% for album in albums %}
<div class="col">
<div class="card h-100">
{% set image = (album.images[1] ?? album.images[0] ?? null) %}
{% set image = (album.images[0] ?? album.images[1] ?? null) %}
{% if image %}
<a href="{{ path('album_show', {id: album.id}) }}">
<img class="card-img-top" src="{{ image.url }}" alt="{{ album.name }} cover" />
@@ -133,8 +133,8 @@
{% set s = stats[album.id] ?? { 'avg': 0, 'count': 0 } %}
<p class="card-text"><small class="text-secondary">User score: {{ s.avg }}/10 ({{ s.count }})</small></p>
<div class="mt-auto">
{% if album.external_urls.spotify is defined and album.external_urls.spotify %}
<a class="btn btn-outline-success btn-sm" href="{{ album.external_urls.spotify }}" target="_blank" rel="noopener">Open in Spotify</a>
{% if album.external_urls.external is defined and album.external_urls.external %}
<a class="btn btn-outline-success btn-sm" href="{{ album.external_urls.external }}" target="_blank" rel="noopener">Open Source</a>
{% endif %}
<a class="btn btn-success btn-sm" href="{{ path('album_show', {id: album.id}) }}">Reviews</a>
{% if app.user and (album.source is not defined or album.source != 'user') %}
@@ -157,5 +157,3 @@
<p>No albums found.</p>
{% endif %}
{% endblock %}