Add viper get in ytdlp version retrieving

This commit is contained in:
Evan Fiordeliso 2023-04-27 13:42:46 -04:00
parent 20a9e6d01a
commit 224fbced27
1 changed files with 3 additions and 1 deletions

View File

@ -5,6 +5,8 @@ import (
"os/exec" "os/exec"
"strings" "strings"
"sync" "sync"
"github.com/spf13/viper"
) )
var ( var (
@ -16,7 +18,7 @@ func GetVersion() string {
var err error var err error
versionOnce.Do(func() { versionOnce.Do(func() {
cmd := exec.Command( cmd := exec.Command(
"yt-dlp", viper.GetString("ytdlp_path"),
"--version", "--version",
) )