<p>
    <ul>
        {% for track in (tracks or []) %}
        <li>
            {% if track.recording_mbid %}
                <a href="https://musicbrainz.org/recording/{{ track.recording_mbid }}">{{ track.track_name }}</a>
            {% else %}
                {{ track.track_name }}
            {% endif %}
            by 
            {% for artist in (track.artists or []) %}
                {% if artist.artist_mbid %}
                    <a href="{{ artist_page_base_url }}{{ artist.artist_mbid }}">{{ artist.artist_credit_name }}</a>{{ artist.join_phrase }}
                {% else %}
                    {{ artist.artist_credit_name }}{{ artist.join_phrase }}
                {% endif %}
            {% endfor %}:
            {{ track.listen_count }} listens
        </li>
        {% endfor %}
    </ul>
</p>