Alpha status reached.
Downloads get run in their own threads which are queued. Downloads of single files as well as zips of playlists are possible. Interaction with db has shown no problems.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{%- extends "bootstrap/base.html" %}
|
||||
{% import "bootstrap/fixes.html" as fixes %}
|
||||
{% import "bootstrap/utils.html" as utils %}
|
||||
|
||||
{% block title %}
|
||||
yt-dls
|
||||
@@ -10,14 +11,18 @@
|
||||
{{ fixes.ie8() }}
|
||||
{% endblock %}
|
||||
|
||||
{% block styles %}
|
||||
{{ super() }}
|
||||
{# Commented out cause don't exist
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="{{url_for('static', filename='example.css')}}">
|
||||
#}
|
||||
{% endblock %}
|
||||
|
||||
{% block navbar %}
|
||||
{{ nav.frontend_top.render() }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{%- with messages = get_flashed_messages(with_categories=True) %}
|
||||
{%- if messages %}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{utils.flashed_messages(messages)}}
|
||||
</div>
|
||||
</div>
|
||||
{%- endif %}
|
||||
{%- endwith %}
|
||||
{% endblock %}
|
||||
@@ -1,28 +1,26 @@
|
||||
{%- extends "base.html" %}
|
||||
|
||||
{% import "bootstrap/utils.html" as utils %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
{%- with messages = get_flashed_messages(with_categories=True) %}
|
||||
{%- if messages %}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{utils.flashed_messages(messages)}}
|
||||
</div>
|
||||
</div>
|
||||
{%- endif %}
|
||||
{%- endwith %}
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<table id="library" style="width:80%">
|
||||
{% for name in query %}
|
||||
{{ super() }}
|
||||
<div class="container" style="width: 50%">
|
||||
<table id="videos" class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>{{ name }}</td>
|
||||
<td>Download</td>
|
||||
<th scope="col" class="text-center">Song</th>
|
||||
<th scope="col" class="text-center">Download</th>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for video in videos %}
|
||||
<tr>
|
||||
<td class="text-center">{{ video['name'] }}</td>
|
||||
<td class="text-center"><a href="/download/{{ video['path'] + video['name'] + video['ext'] }}" download>Link</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<form action="/download/{{ videos[0]['path'] }}">
|
||||
<input type="submit" class="btn pull-right" value="Download all"/>
|
||||
</form>
|
||||
</div>
|
||||
{%- endblock %}
|
||||
@@ -1,39 +1,28 @@
|
||||
{%- extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{{ super() }}
|
||||
<div class="container">
|
||||
<form method="POST">
|
||||
{{ form.csrf_token }}
|
||||
{{ form.url.label }} <br>
|
||||
{{ form.url }}
|
||||
{{ form.submit }}
|
||||
</form>
|
||||
<div class="card" style="width: fit-content">
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item">
|
||||
<form method="POST">
|
||||
{{ form.csrf_token }}
|
||||
{{ form.url.label }} <br>
|
||||
{{ form.url }}
|
||||
{{ form.submit }}
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% if form.errors %}
|
||||
{{ form.errors['url'][0][:-1] + ', try again.' }}
|
||||
{% endif %}
|
||||
{% if ytLink == False %}
|
||||
|
||||
{% if not ytLink %}
|
||||
Please enter a full, valid YouTube URL.
|
||||
{% endif %}
|
||||
|
||||
{% if titles %}
|
||||
<div class="container">
|
||||
<table id="videos" class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="text-center">Title</th>
|
||||
<th scope="col" class="text-center">URL</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for i in range(amount) %}
|
||||
<tr>
|
||||
<td class="text-center">{{ titles[i] }}</td>
|
||||
<td class="text-center"> <a href="{{ urls[i] }}" target="_blank">Link</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{%- endblock %}
|
||||
@@ -3,19 +3,8 @@
|
||||
{% import "bootstrap/utils.html" as utils %}
|
||||
|
||||
{% block content %}
|
||||
{{ super() }}
|
||||
<div class="container">
|
||||
|
||||
{%- with messages = get_flashed_messages(with_categories=True) %}
|
||||
{%- if messages %}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{utils.flashed_messages(messages)}}
|
||||
</div>
|
||||
</div>
|
||||
{%- endif %}
|
||||
{%- endwith %}
|
||||
|
||||
<a href="http://pythonhosted.org/Flask-Bootstrap">Documentation</a>. </p>
|
||||
|
||||
</div>
|
||||
{%- endblock %}
|
||||
@@ -1,47 +1,58 @@
|
||||
{%- extends "base.html" %}
|
||||
|
||||
{% import "bootstrap/utils.html" as utils %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<table id="videos" class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="text-center">Song</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">Link</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{{ super() }}
|
||||
<div class="container">
|
||||
|
||||
<div class="card" style="width: 100%">
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item">
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<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 href="/download/{{ video['path'] + video['name'] + video['ext'] }}" download>Link</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<br><br>
|
||||
|
||||
|
||||
<div class="col-md-1"></div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<table id="playlists" class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="text-center">Playlists</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for playlist in playlists %}
|
||||
{% if playlists %}
|
||||
<div class="col-md-2">
|
||||
<table id="playlists" class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center">{{ playlist['name'] }}</td>
|
||||
<th scope="col" class="text-center">Playlists</th>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for playlist in playlists %}
|
||||
<tr>
|
||||
<td class="text-center"> <a href="/library-playlist?playlist={{ playlist['ROWID'] }}">{{ playlist['name'] }}</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{%- endblock %}
|
||||
31
templates/new-downloads.html
Normal file
31
templates/new-downloads.html
Normal file
@@ -0,0 +1,31 @@
|
||||
{%- extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{{ super() }}
|
||||
<div class="container">
|
||||
|
||||
{% if titles %}
|
||||
<div class="container">
|
||||
<table id="videos" class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="text-center">New Title(s)</th>
|
||||
<th scope="col" class="text-center">URL</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for i in range(amount) %}
|
||||
<tr>
|
||||
<td class="text-center">{{ titles[i] }}</td>
|
||||
<td class="text-center"> <a href="{{ urls[i] }}" target="_blank">Link</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<form target="/start-download"
|
||||
<input type="submit"
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{%- endblock %}
|
||||
@@ -1,8 +1,7 @@
|
||||
{%- extends "base.html" %}
|
||||
|
||||
{% import "bootstrap/utils.html" as utils %}
|
||||
|
||||
{% block content %}
|
||||
{{ super() }}
|
||||
<div class="container">
|
||||
{%- with messages = get_flashed_messages(with_categories=True) %}
|
||||
{%- if messages %}
|
||||
|
||||
Reference in New Issue
Block a user