{% 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 }})

{% endfor %}
{% elseif query or album or artist or year_from or year_to %}

No albums found.

{% endif %} {% endblock %}