fix thumbnail download
This commit is contained in:
parent
5d230a6b54
commit
b7037900f8
1 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue