diff --git a/downloader/downloaders/ytdlp-lib.go b/downloader/downloaders/ytdlp-lib.go index 14e9822..7c29c87 100644 --- a/downloader/downloaders/ytdlp-lib.go +++ b/downloader/downloaders/ytdlp-lib.go @@ -8,12 +8,18 @@ import ( "github.com/lrstanley/go-ytdlp" ) +func init() { + // Ensure yt-dlp is installed/up-to-date for this environment. + ytdlp.MustInstall(context.TODO(), nil) +} + var dl = ytdlp.New(). // FormatSort("bestvideo[ext=mp4]+bestaudio[ext=m4a]"). FormatSort("res,ext:mp4:m4a"). Output("C:/Users/Administrator/ytdlpVideos/%(uploader)s/%(title)s.%(ext)s"). LimitRate(fmt.Sprintf("%dM", 150/DOWNLOAD_WORKERS)). // HTTPChunkSize("20M"). + ExtractorArgs("youtube:player_client=android"). MarkWatched(). SponsorblockMark("all"). RecodeVideo("mp4").