Fix incorrect thumbnail issue

This commit is contained in:
Evan Fiordeliso 2024-11-06 23:25:44 -05:00
parent 247cc211fa
commit d814432ebb
3 changed files with 21 additions and 2 deletions

View File

@ -15,7 +15,7 @@
{{end}} {{end}}
<div class="d-flex flex-column flex-lg-row justify-content-center gap-5 mt-5"> <div class="d-flex flex-column flex-lg-row justify-content-center gap-5 mt-5">
<div class="d-flex justify-content-center"> <div class="d-flex justify-content-center">
<img src="{{.Meta.Thumbnail}}" alt="{{.Meta.Title}}" style="max-height: 25rem; max-width: 100%; margin: 0 auto" /> <img src="{{$video.Meta.Thumbnail}}" alt="{{$video.Meta.Title}}" style="max-height: 25rem; max-width: 100%; margin: 0 auto" />
</div> </div>
<div class="downloads flex-lg-grow-1"> <div class="downloads flex-lg-grow-1">
{{range $index, $format := $video.Formats}} {{range $index, $format := $video.Formats}}

2
go.mod
View File

@ -1,6 +1,6 @@
module go.fifitido.net/ytdl-web module go.fifitido.net/ytdl-web
go 1.21 go 1.22
require ( require (
github.com/adrg/xdg v0.4.0 github.com/adrg/xdg v0.4.0

19
pkg/ytdl/error.go Normal file
View File

@ -0,0 +1,19 @@
package ytdl
type Error struct {
stdout string
stderr string
child error
}
func (e *Error) Error() string {
return e.child.Error()
}
func (e *Error) Stdout() string {
return e.stdout
}
func (e *Error) Stderr() string {
return e.stderr
}