Files
yt-mls/templates/library.html
2023-08-03 10:50:16 +02:00

62 lines
2.8 KiB
HTML

{%- extends "base.html" %}
{% block content %}
{{ super() }}
<div class="container-fluid" style="width: fit-content(105%)">
{% if playlists %}
<div class="card">
<ul class="list-group list-group-flush">
<li class="list-group-item">
<div class="row">
<table id="playlists" class="table">
<thead>
<tr>
<th scope="col" class="text-center">Playlists</th>
<th scope="col" class="text-center">Update</th>
</tr>
</thead>
<tbody>
{% for playlist in playlists %}
<tr>
<td class="text-center"><a class="btn" href="/library-playlist?playlist={{ playlist['ROWID'] }}">{{ playlist['name'] }}</a></td>
<td class="text-center"><a class="btn" href="/update/{{ playlist[1] }}">Start</a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</li>
</ul>
</div>
{% endif %}
<br><br>
{% if videos %}
<div class="card">
<ul class="list-group list-group-flush">
<li class="list-group-item">
<div class="row">
<table id="videos" class="table">
<thead>
<tr>
<th scope="col" class="text-center">Title</th>
<th scope="col" class="text-center">Download</th>
</tr>
</thead>
<tbody>
{% for video in videos %}
<tr>
<td class="text-center">{{ video['name'] }}</td>
<td class="text-center"><a class="btn" href="/download/{{ video['path'] + video['name'] + video['ext'] }}" download>Link</a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</li>
</ul>
</div>
{% endif %}
</div>
{%- endblock %}