{% from "_macros.html" import cover_url %} {% if existing %}
Already in catalog: {{ work.title }} {% if work.creators %} — {% for wc in work.creators %}{{ wc.creator.display_name }}{% if not loop.last %}, {% endif %}{% endfor %}{% endif %}
Adding another copy to this work.
{% else %}
{% if meta.cover_image_url %} Cover {% endif %}
{{ meta.title }} {% if meta.subtitle %}
{{ meta.subtitle }}{% endif %} {% if meta.authors %}
{{ meta.authors | join(", ") }}{% endif %} {% if meta.publisher %}
{{ meta.publisher }}{% if meta.publication_year %}, {{ meta.publication_year }}{% endif %}{% endif %} {% if meta.extra_metadata and meta.extra_metadata.format %}
{{ meta.extra_metadata.format }}{% if meta.extra_metadata.track_count %} · {{ meta.extra_metadata.track_count }} tracks{% endif %} {% endif %} {% if meta.extra_metadata and meta.extra_metadata.runtime_minutes %}
{{ meta.extra_metadata.runtime_minutes }} min{% if meta.extra_metadata.genres %} · {{ meta.extra_metadata.genres | join(", ") }}{% endif %} {% endif %}
{% if meta.extra_metadata and meta.extra_metadata.tracks %}
Tracklist ({{ meta.extra_metadata.track_count }})
    {% for track in meta.extra_metadata.tracks %}
  1. {{ track.title }} {% if track.length_ms %} {% set s = track.length_ms // 1000 %} {{ s // 60 }}:{{ "0" if s % 60 < 10 else "" }}{{ s % 60 }} {% endif %}
  2. {% endfor %}
{% endif %} {% endif %}