diff --git a/Dockerfile b/Dockerfile index 330ab32..f888be8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,18 @@ # bump: golang /GOLANG_VERSION=([\d.]+)/ docker:golang|^1 # bump: golang link "Release notes" https://golang.org/doc/devel/release.html ARG GOLANG_VERSION=1.17.5 -# bump: youtube-dl /YDL_VERSION=([\d.]+)/ https://github.com/ytdl-org/youtube-dl.git|/^\d/|sort -# bump: youtube-dl link "Release notes" https://github.com/ytdl-org/youtube-dl/releases/tag/$LATEST -ARG YDL_VERSION=2021.06.06 +# bump: yt-dlp /YT_DLP=([\d.-]+)/ https://github.com/yt-dlp/yt-dlp.git|/^\d/|sort +# bump: yt-dlp link "Release notes" https://github.com/yt-dlp/yt-dlp/releases/tag/$LATEST +ARG YT_DLP=2021.12.01 FROM golang:$GOLANG_VERSION AS base -ARG YDL_VERSION +ARG YT_DLP RUN \ apt-get update -q && \ apt-get install -y -q python-is-python3 && \ - curl -L -o /usr/local/bin/youtube-dl https://yt-dl.org/downloads/$YDL_VERSION/youtube-dl && \ - chmod a+x /usr/local/bin/youtube-dl + curl -L https://github.com/yt-dlp/yt-dlp/releases/download/$YT_DLP/yt-dlp -o /usr/local/bin/yt-dlp && \ + chmod a+x /usr/local/bin/yt-dlp FROM base AS dev diff --git a/README.md b/README.md index 1adc91c..943f612 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,15 @@ ## goutubedl -Go wrapper for [youtube-dl](https://github.com/ytdl-org/youtube-dl). API documentation can be found at [godoc.org](https://pkg.go.dev/github.com/wader/goutubedl?tab=doc). +Go wrapper for [youtube-dl](https://github.com/ytdl-org/youtube-dl) and [yt-dlp](https://github.com/yt-dlp/yt-dlp), currently tested and +developed using yt-dlp. +API documentation can be found at [godoc.org](https://pkg.go.dev/github.com/wader/goutubedl?tab=doc). -See [youtube-dl documentation](https://github.com/ytdl-org/youtube-dl) for how to +See [yt-dlp documentation](https://github.com/yt-dlp/yt-dlp) for how to install and what is recommended to install in addition to youtube-dl. goutubedl default uses `PATH` to find youtube-dl but it can be configured with the `goutubedl.Path` -variable. +variable. Default is currently `youtube-dl` for backwards compability. If your using yt-dlp you +probably want to set it to `yt-dlp`. Due to the nature and frequent updates of youtube-dl only the latest version is tested. But it seems to work well with older versions also.