66 lines
1.9 KiB
HTML
66 lines
1.9 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<title>Downloaded Videos</title>
|
|
<meta http-equiv="refresh" content="10">
|
|
<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>URL</th>
|
|
<th>Length</th>
|
|
<th>Status</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
{{range .videos}}
|
|
<tr>
|
|
<td>{{.ID}} {{.Title}}</td>
|
|
<td>{{.URL}}</td>
|
|
<td>{{.Length}}</td>
|
|
<td>{{.Status}}</td>
|
|
<td>
|
|
{{if eq .Status "completed"}}
|
|
<a href="/downloads/video/{{.VideoFilename}}">Download Video ({{.VideoSize}})</a> |
|
|
<a href="/downloads/audio/{{.AudioFilename}}">Download Audio ({{.AudioSize}})</a>
|
|
{{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"}}
|
|
<form action="/video/{{.ID}}/cancel" method="post" style="display:inline;">
|
|
<button type="submit">Cancel</button>
|
|
</form>
|
|
{{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>
|
|
</body>
|
|
|
|
</html> |