UI improvements

This commit is contained in:
Maximilian Wagner
2023-08-05 01:52:50 +02:00
parent a72c9eac39
commit 7d18ab512b
7 changed files with 56 additions and 47 deletions

View File

@@ -16,7 +16,7 @@
{% for video in videos %}
<tr>
<td class="text-center">{{ video['name'] }}</td>
<td class="text-center"><a class="btn btn-link" href="/download/{{ video['path'] + video['name'] + video['ext'] }}" download>Download</a></td>
<td class="text-center"><a class="btn btn-link" href="/download?file={{ video['path'] + video['name'] + video['ext'] }}" download>Download</a></td>
</tr>
{% endfor %}
</tbody>
@@ -25,12 +25,19 @@
</div>
</div>
<div class="container" style="padding: 1.5%">
<form action="/delete/{{ folder }}">
<form action="/delete">
<input type="hidden" name="file" value="{{ folder }}">
<input type="submit" class="btn btn-danger float-start" value="Delete playlist">
</form>
<form action="/download/{{ folder }}">
<form action="/download">
<input type="hidden" name="file" value="{{ folder }}">
<input type="submit" class="btn btn-primary float-end" value="Download all"/>
</form>
<form action="/update" style="padding-right: 30%">
<input type="hidden" name="list" value="{{ request.args.get('playlist') }}">
<input type="hidden" name="from" value="/library-playlist?playlist={{ request.args.get('playlist') }}">
<input type="submit" class="btn btn-primary float-end" value="Update playlist"/>
</form>
</div>
</div>
{%- endblock %}

View File

@@ -27,14 +27,5 @@
</form>
</div>
</div>
{% if form.errors %}
{{ form.errors['url'][0][:-1] + ', try again.' }}
{% endif %}
{% if not ytLink %}
Please enter a full, valid YouTube URL.
{% endif %}
</div>
{%- endblock %}

View File

@@ -27,7 +27,7 @@
<br><br>
{% if titles %}
{% if titles and titles[0] not in running_downloads[0][0] %}
<div class="card">
<div class="card-body">
<table class="table">

View File

@@ -17,7 +17,7 @@
{% for playlist in playlists %}
<tr>
<td class="text-center align-middle"><a class="btn btn-link" href="/library-playlist?playlist={{ playlist['ROWID'] }}">{{ playlist['name'] }}</a></td>
<td class="text-center align-middle"><a class="btn btn-link" href="/update/{{ playlist[1] }}">Start</a></td>
<td class="text-center align-middle"><a class="btn btn-link" href="/update?list={{ playlist[1] }}&from=/library">Start</a></td>
</tr>
{% endfor %}
</tbody>
@@ -36,6 +36,7 @@
<tr>
<th scope="col" class="text-center align-middle">Titles not in any playlist</th>
<th scope="col" class="text-center align-middle">Download</th>
<th scope="col" class="text-center align-middle">Delete</th>
</tr>
</thead>
<tbody>
@@ -43,14 +44,16 @@
{% if 'mp3' in video['ext'] %}
<tr>
<td class="text-center align-middle">{{ video['name'] }}</td>
<td class="text-center align-middle"><a class="btn btn-link" href="/download/{{ video['path'] + video['name'] + video['ext'] }}" download>Download</a></td>
<td class="text-center align-middle"><a class="btn btn-link" href="/download?file={{ video['path'] + video['name'] + video['ext'] }}" download>Download</a></td>
<td class="text-center align-middle"><a class="btn btn-danger" href="/delete?file={{ video['path'] + video['name'] + video['ext'] }}&from=/library"> </a></td>
</tr>
{% endif %}
{% if 'mp4' in video['ext'] %}
<tr>
<td class="text-center align-middle">{{ video['name'] }}</td>
<td class="text-center align-middle"><a class="btn btn-link" href="/player?file={{ video['path'] + video['name'] + video['ext'] }}">Watch</a></td>
<td class="text-center align-middle"><a class="btn btn-link" href="/player?file={{ video['path'] + video['name'] + video['ext'] }}">{{ video['name'] }}</a></td>
<td class="text-center align-middle"><a class="btn btn-link" href="/download?file={{ video['path'] + video['name'] + video['ext'] }}" download>Download</a></td>
<td class="text-center align-middle"><a class="btn btn-danger" href="/delete?file={{ video['path'] + video['name'] + video['ext'] }}&from=library"> </a>
</tr>
{% endif %}
{% endfor %}