From b7037900f8217dc64900fc7b507a74dbcc109d9b Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Thu, 6 Aug 2020 23:53:03 +0200 Subject: [PATCH] fix thumbnail download --- thumbs/uploader.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/thumbs/uploader.go b/thumbs/uploader.go index e1ff62e..b61a05e 100644 --- a/thumbs/uploader.go +++ b/thumbs/uploader.go @@ -4,6 +4,7 @@ import ( "io" "net/http" "os" + "strings" "github.com/lbryio/ytsync/v5/downloader/ytdl" @@ -32,7 +33,9 @@ func (u *thumbnailUploader) downloadThumbnail() error { return errors.Err(err) } defer img.Close() - + if strings.HasPrefix(u.originalUrl, "//") { + u.originalUrl = "https:" + u.originalUrl + } resp, err := http.Get(u.originalUrl) if err != nil { return errors.Err(err)