Files
ytdlp-site/templates/videos.html
Carl Pearson 1b229f7417 Remove cancel
2024-09-20 05:24:33 -06:00

86 lines
2.3 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="refresh" content="10">
<title>Downloaded Videos</title>
<style>
table {
width: 100%;
border-collapse: collapse;
}
th,
td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
th {
background-color: #f2f2f2;
}
</style>
</head>
<body>
<h1>Downloaded Videos</h1>
<table>
<tr>
<th>Title</th>
<th>Author</th>
<th>URL</th>
<th>Type</th>
<th>Status</th>
<th>Actions</th>
</tr>
{{range .videos}}
<tr>
<td>
{{if eq .Status "completed"}}
<a href="/video/{{.ID}}">{{.Title}}</a>
{{else}}
{{.Title}}
{{end}}
</td>
<td>{{.Artist}}</td>
<td><a href="{{.URL}}">{{.URL}}</a></td>
<td>
{{if .Audio}}
Audio
{{end}}
{{if .Video}}
Video
{{end}}
</td>
<td>{{.Status}}</td>
<td>
{{if eq .Status "completed"}}
<form action="/video/{{.ID}}/process" method="post" style="display:inline;">
<button type="submit">Redo Processing</button>
</form>
{{else if eq .Status "failed"}}
<form action="/video/{{.ID}}/restart" method="post" style="display:inline;">
<button type="submit">Restart</button>
</form>
{{else if eq .Status "downloading"}}
{{end}}
<form action="/video/{{.ID}}/delete" method="post" style="display:inline;">
<button type="submit">Delete</button>
</form>
</td>
</tr>
{{end}}
</table>
<p><a href="/download">Download New Video</a></p>
<p><a href="/logout">Logout</a></p>
<div class="footer">
<div class="build-id">Build ID: {{.build_id}}</div>
</div>
</body>
</html>