{% load i18n %}
  <div class="audiotracks-list-entry">
    {% if track.image %}
    <img class="track-image" src="{{ track.image.url_48x48 }}" alt="{% trans 'Track Image' %}" />
    {% endif %}
    <div class="track-details">
      <a href="{% url 'track_detail' track.user.username track.slug %}">
        <p class="track-title">
        {% if track.artist %} {{ track.artist }} &#8211; {% endif %}{{ track.title|title }}{% if track.genre %} ({{ track.genre }}){% endif %}
        </p>
      </a>
      <p class="upload-details">
        {% trans 'uploaded by' %}
        {{ track.user.username }}
        {% blocktrans with track.created_at|timesince as track_age %}{{ track_age }} ago{% endblocktrans %}
      </p>
    </div>
    <div class="player-container">
      <audio preload="none">
        <source src="{{ track.audio_file.url }}" type="{{ track.mimetype }}">
      </audio>
    </div>
    <p class="debug-info">Player type: <span class="audio-type"></span></p>
    {% if track.user == request.user %}
    <div class="audiotracks-action">
      <a href="{% url 'edit_track' track.id %}">{% trans 'Edit' %}</a>
      <a href="{% url 'confirm_delete_track' track.id %}">{% trans 'Delete' %}</a>
    </div>
    {% endif %}
  </div>

