{% extends "base_detail.html" %}

{% block title %}{{object.title}}{% if object.tv_series %} - {{object.tv_series}}{% endif %}{% endblock %}

{% block details %}
<div class="row">
    <div class="col-md">
        <h3>Last scrobbles</h3>
        <div class="table-responsive">
            <table class="table table-striped table-sm">
                <thead>
                    <tr>
                        <th scope="col">Date</th>
                        <th scope="col">Title</th>
                        {% if object.tv_series %}
                        <th scope="col">Series</th>
                        <th scope="col">Season</th>
                        <th scope="col">Episode</th>
                        {% endif %}
                    </tr>
                </thead>
                <tbody>
                    {% for scrobble in object.scrobble_set.all %}
                    <tr>
                        <td>{{scrobble.timestamp}}</td>
                        <td>{{scrobble.video.title}}</td>
                        {% if object.tv_series %}
                        <td>{{scrobble.video.tv_series}}</td>
                        <td>{{scrobble.video.season_number}}</td>
                        <td>{{scrobble.video.episode_number}}</td>
                        {% endif %}
                    </tr>
                    {% endfor %}
                </tbody>
            </table>
        </div>
    </div>
</div>
{% endblock %}
