if you just want to make sure youtube-dl is "new enough" then why not do something like this:
function version { echo "$@" | awk -F. '{ printf("%04d%02d%02d\n", $1,$2,$3); }'; }
ytdl_version=$(youtube-dl --version)
if [ $(version "$ytdl_version") -lt $(version "2021.10.07") ]; then
echo "do stuff to install new version"
fi
also FYI, anything older than something from Feb 2022 is going to be EXTREMLY SLOW to download videos from youtube due to a change on youtube's end that now clients have to solve a puzzle to get fullspeed
you can read about it here: https://github.com/ytdl-org/youtube-dl/pull/30184
commits with the fix are at the bottom
yes I realize this tool does not use youtube-dl to actually download the files (thats handled through the vlc lua script) but you should at least be doing proper checking
I have youtube-dl version
2022.02.04
(a self compiled version)What is the goal here?
if you just want to make sure youtube-dl is "new enough" then why not do something like this:
also FYI, anything older than something from Feb 2022 is going to be EXTREMLY SLOW to download videos from youtube due to a change on youtube's end that now clients have to solve a puzzle to get fullspeed you can read about it here: https://github.com/ytdl-org/youtube-dl/pull/30184 commits with the fix are at the bottom
yes I realize this tool does not use youtube-dl to actually download the files (thats handled through the vlc lua script) but you should at least be doing proper checking