add download attribute to vide/audio links

This commit is contained in:
Carl Pearson
2024-09-08 05:50:13 -06:00
parent dc6b391e5a
commit fea1704245

View File

@@ -35,14 +35,20 @@
</tr> </tr>
{{range .videos}} {{range .videos}}
<tr> <tr>
<td><a href="/video/{{.ID}}">{{.Title}}</a></td> <td>
{{if eq .Status "completed"}}
<a href="/video/{{.ID}}">{{.Title}}</a>
{{else}}
{{.Title}}
{{end}}
</td>
<td><a href="{{.URL}}">{{.URL}}</a></td> <td><a href="{{.URL}}">{{.URL}}</a></td>
<td>{{.Length}}</td> <td>{{.Length}}</td>
<td>{{.Status}}</td> <td>{{.Status}}</td>
<td> <td>
{{if eq .Status "completed"}} {{if eq .Status "completed"}}
<a href="/downloads/video/{{.VideoFilename}}">Download Video ({{.VideoSize}})</a> | <a href="/downloads/video/{{.VideoFilename}}" download>Download Video ({{.VideoSize}})</a> |
<a href="/downloads/audio/{{.AudioFilename}}">Download Audio ({{.AudioSize}})</a> <a href="/downloads/audio/{{.AudioFilename}}" download>Download Audio ({{.AudioSize}})</a>
{{else if eq .Status "failed"}} {{else if eq .Status "failed"}}
<form action="/video/{{.ID}}/restart" method="post" style="display:inline;"> <form action="/video/{{.ID}}/restart" method="post" style="display:inline;">
<button type="submit">Restart</button> <button type="submit">Restart</button>