Simplify version check

This commit is contained in:
Nonoo 2023-08-16 10:40:01 +02:00
parent 327e095043
commit 764e0ac0d8

View File

@ -22,12 +22,10 @@ func ytdlpVersionCheck(ctx context.Context) (latestVersion, currentVersion strin
}
latestVersion = release.GetTagName()
out, err := exec.Command(goutubedl.Path, "--version").Output()
currentVersion, err = goutubedl.Version(ctx)
if err != nil {
return "", "", fmt.Errorf("getting current yt-dlp version: %w", err)
}
currentVersion = strings.TrimSpace(string(out))
return
}