{# Renders one page of /fragment/search/results (or a query error) for the search page. #}
{% macro source_path_cell(paths) -%}
{%- if paths | length == 1 -%}
{{ paths[0] }}
{%- elif paths -%}
{{ paths | length }} paths
{% for path in paths %}
{{ path }}{{ path }}{%- else -%}—{%- endif -%}
{%- endmacro %}
{% if error %}
Query error: {{ error }}
{% elif results %}Showing {{ start_index }}–{{ end_index }} of {{ total }} {{ "albums" if albums else "tracks" }}.
{% if missing_source_count %}{{ missing_source_count }} of the {{ "albums" if albums else "tracks" }} on this page {{ "has" if missing_source_count == 1 else "have" }} no recorded source path. Source paths are known only for imports reported by the beetkeeper beets plugin; these were likely imported without it (or before it was configured).
{% endif %}| Album artist | Album | Year | Source path(s) | Destination path | ||
|---|---|---|---|---|---|---|
| Artist | Album | Title | Track | Year | Source path(s) | Destination path |
| {{ row['albumartist'] }} | {{ row['album'] }} | {{ row['year'] or "" }} | {{ source_path_cell(source_paths_by_id.get(row['id'], [])) }} | {{ destination_path_cell(row['path']) }} | ||
| {{ row['artist'] }} | {{ row['album'] }} | {{ row['title'] }} | {{ row['track'] or "" }} | {{ row['year'] or "" }} | {{ source_path_cell(source_paths_by_id.get(row['id'], [])) }} | {{ destination_path_cell(row['path']) }} |
{% if page > 1 %} {% endif %} {% if end_index < total %} {% endif %}
{% endif %} {% elif total %}No results on this page — {{ total }} {{ "albums" if albums else "tracks" }} match.
{% else %}
No matches.
{% endif %}