define static location for yt-dlp binary
This commit is contained in:
@@ -3,13 +3,17 @@ package main
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/lrstanley/go-ytdlp"
|
||||
)
|
||||
|
||||
var ytdlpBinary = os.Getenv("YTDLP_BIN")
|
||||
|
||||
func GetFormats(url string) (*FormatOptions, error) {
|
||||
dl := ytdlp.New().
|
||||
SetExecutable(ytdlpBinary).
|
||||
SkipDownload().
|
||||
DumpJSON()
|
||||
|
||||
@@ -100,6 +104,7 @@ func DownloadVideo(out_dir, temp_dir, url string, opts DownloadOptions, progress
|
||||
var lastPhase string
|
||||
|
||||
dl := ytdlp.New().
|
||||
SetExecutable(ytdlpBinary).
|
||||
Paths(homePath).
|
||||
Paths(tempPath).
|
||||
RecodeVideo("mp4").
|
||||
|
||||
Reference in New Issue
Block a user