50 lines
2.6 KiB
HTML
50 lines
2.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>YouTube Download Jobs - Sanctuary Commander</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1 class="text-center">YouTube Download Jobs</h1>
|
|
<hr>
|
|
<nav class="mb-3" aria-label="Page navigation">
|
|
<a class="btn btn-secondary" href="{{ url_for('home.root_route') }}">Home</a>
|
|
<a class="btn btn-primary" href="{{ url_for('youtube_download.request_download') }}">Request a Video</a>
|
|
</nav>
|
|
<p>Pending, downloading, and failed jobs are always shown. Refresh this page to see updated statuses.</p>
|
|
<form action="{{ url_for('youtube_download.list_jobs') }}" method="GET" class="mb-3">
|
|
<div class="form-check mb-2">
|
|
<input class="form-check-input" type="checkbox" name="show_completed" id="show_completed" value="1" {% if show_completed %}checked{% endif %}>
|
|
<label class="form-check-label" for="show_completed">Include completed jobs</label>
|
|
</div>
|
|
<button class="btn btn-secondary" type="submit">Update List</button>
|
|
</form>
|
|
{% if jobs %}
|
|
<div class="table-responsive">
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr><th scope="col">Job</th><th scope="col">Media Name</th><th scope="col">YouTube URL</th><th scope="col">Status</th><th scope="col">Failed Attempts</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for job in jobs %}
|
|
<tr>
|
|
<td>{{ job.youtube_download_job_id }}</td>
|
|
<td>{{ job.youtube_download_job_media_name or '(Video title will be used)' }}</td>
|
|
<td class="text-break">{{ job.youtube_download_job_url }}</td>
|
|
<td>{{ job.youtube_download_job_status }}</td>
|
|
<td>{{ job.youtube_download_job_retry_count }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% else %}
|
|
<p role="status">No download jobs to show.</p>
|
|
{% endif %}
|
|
</div>
|
|
</body>
|
|
</html>
|