{% extends 'base.html.twig' %} {% block title %}Album Search{% endblock %} {% block body %}

Search Albums

{% if query is empty and (album is empty) and (artist is empty) and (year_from is empty) and (year_to is empty) %}

Tip: Use the Advanced search to filter by album, artist, or year range.

{% endif %} {% if albums is defined and albums|length > 0 %}
{% for album in albums %}
{% set image = (album.images[1] ?? album.images[0] ?? null) %} {% if image %} {{ album.name }} cover {% endif %}
{{ album.name }}

{{ album.artists|map(a => a.name)|join(', ') }}

Released {{ album.release_date }} • {{ album.total_tracks }} tracks

{% set s = stats[album.id] ?? { 'avg': 0, 'count': 0 } %}

User score: {{ s.avg }}/10 ({{ s.count }})

{% if album.external_urls.spotify is defined and album.external_urls.spotify %} Open in Spotify {% endif %} Reviews {% if album.source is defined and album.source == 'user' %} User album {% endif %} {% if app.user and (album.source is not defined or album.source != 'user') %} {% if savedIds is defined and (album.id in savedIds) %} Saved {% else %}
{% endif %} {% endif %}
{% endfor %}
{% elseif query or album or artist or year_from or year_to %}

No albums found.

{% endif %} {% endblock %}