ytdl-web/web/views/download.html

36 lines
1.4 KiB
HTML
Raw Normal View History

2023-04-14 16:07:57 -04:00
<div class="d-flex flex-column align-items-center">
<h1>Download Video</h1>
<h2 class="fs-4 text-muted text-center">{{.Meta.Title}}</h2>
2023-04-14 16:07:57 -04:00
<p style="font-size: 0.85rem">{{.Url}}</p>
2023-04-14 22:01:36 -04:00
<a href="{{.BasePath}}/" class="btn btn-secondary btn-sm mt-3" style="width: 30rem; max-width: 100%">
Download Another Video
</a>
2023-04-14 16:07:57 -04:00
</div>
2023-04-14 22:01:36 -04:00
{{$root := .}}
2023-04-14 22:01:36 -04:00
{{range $vidIndex, $video := .Videos}}
{{if not (eq $vidIndex 0)}}
<hr class="mt-5" />
{{end}}
<div class="d-flex flex-column flex-lg-row justify-content-center gap-5 mt-5">
<div class="d-flex justify-content-center">
<img src="{{.Meta.Thumbnail}}" alt="{{.Meta.Title}}" style="max-height: 25rem; max-width: 100%; margin: 0 auto;" />
</div>
<div class="downloads flex-lg-grow-1">
{{range $index, $format := $video.Formats}}
<div style="font-size: smaller">{{$format.Format}}</div>
2023-04-14 22:01:36 -04:00
<div class="flex-grow-1 d-flex gap-3">
<a class="btn btn-primary flex-grow-1" download="{{$root.Meta.ID}}-{{$format.Resolution}}.{{$format.Ext}}" P
href="{{$format.Url}}">
2023-04-14 22:01:36 -04:00
Download (direct)
</a>
<a class="btn btn-primary flex-grow-1" download="{{$root.Meta.ID}}-{{$format.Resolution}}.{{$format.Ext}}"
2023-05-23 19:35:52 -04:00
href="{{$root.BasePath}}/download/proxy?url={{queryEscape $root.Url}}&format={{$format.FormatID}}&index={{$vidIndex}}">
2023-04-14 22:01:36 -04:00
Download (proxied)
</a>
</div>
{{end}}
2023-04-14 16:07:57 -04:00
</div>
</div>
{{end}}