Add length and download sizes

This commit is contained in:
Carl Pearson
2024-09-06 15:21:42 -06:00
parent c7d65bf999
commit 6b50fbcc6f
3 changed files with 79 additions and 5 deletions

View File

@@ -3,7 +3,7 @@
<head>
<title>Downloaded Videos</title>
<meta http-equiv="refresh" content="5">
<meta http-equiv="refresh" content="10">
<style>
table {
width: 100%;
@@ -27,20 +27,22 @@
<h1>Downloaded Videos</h1>
<table>
<tr>
<th>URL</th>
<th>Title</th>
<th>URL</th>
<th>Length</th>
<th>Status</th>
<th>Actions</th>
</tr>
{{range .videos}}
<tr>
<td>{{.URL}}</td>
<td>{{.Title}}</td>
<td>{{.URL}}</td>
<td>{{.Length}}</td>
<td>{{.Status}}</td>
<td>
{{if eq .Status "completed"}}
<a href="/downloads/video/{{.VideoFilename}}">Download Video</a> |
<a href="/downloads/audio/{{.AudioFilename}}">Download Audio</a>
<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>