{# 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
{%- else -%} Not recorded {%- endif -%} {%- endmacro %} {% macro destination_path_cell(path) -%} {%- if 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 %} {% if albums %} {% else %} {% endif %} {% for row in results %} {% if albums %} {% else %} {% endif %} {% endfor %}
Album artistAlbumYearSource path(s)Destination path
ArtistAlbumTitleTrackYearSource 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 or end_index < total %}

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