From d814432ebbde4d35d0eaa8c042320a8a7ddf719b Mon Sep 17 00:00:00 2001 From: Evan Fiordeliso Date: Wed, 6 Nov 2024 23:25:44 -0500 Subject: [PATCH] Fix incorrect thumbnail issue --- app/views/download.html | 2 +- go.mod | 2 +- pkg/ytdl/error.go | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 pkg/ytdl/error.go diff --git a/app/views/download.html b/app/views/download.html index d11fa42..86ef67c 100644 --- a/app/views/download.html +++ b/app/views/download.html @@ -15,7 +15,7 @@ {{end}}
- {{.Meta.Title}} + {{$video.Meta.Title}}
{{range $index, $format := $video.Formats}} diff --git a/go.mod b/go.mod index c4d2866..8fcf5f0 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module go.fifitido.net/ytdl-web -go 1.21 +go 1.22 require ( github.com/adrg/xdg v0.4.0 diff --git a/pkg/ytdl/error.go b/pkg/ytdl/error.go new file mode 100644 index 0000000..42e5650 --- /dev/null +++ b/pkg/ytdl/error.go @@ -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 +}