Last active
March 1, 2024 11:50
-
-
Save jonath92/0f6bf4606bc8a34be1bb0826c99b73d1 to your computer and use it in GitHub Desktop.
Install-Update-Youtube-dl Linux Mint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a simple script for install youtube-dl and creating a script in /etc/cron.daily | |
# to automatically update youtube-dl on a daily basis. | |
# can be executed with: | |
# sudo su -c "bash <(wget -qO- https://gist.githubusercontent.com/jonath92/0f6bf4606bc8a34be1bb0826c99b73d1/raw/914aabe6c4b15dc614f18c8816f5ad2828755c22/install-Update-Youtube-dl.sh)" root | |
# Remove apt version to prevent conflicts | |
apt purge -y youtube-dl | |
# Fix python not found error https://askubuntu.com/a/1149489/1013434 | |
ln -s /usr/bin/python3 /usr/local/bin/python | |
# Install youtube-dl | |
# https://github.com/ytdl-org/youtube-dl#installation | |
curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl | |
chmod a+rx /usr/local/bin/youtube-dl | |
# create script for daily update | |
UPDATE_PATH="/etc/cron.daily/update_youtube_dl" | |
touch ${UPDATE_PATH} | |
echo "#! /bin/sh" > ${UPDATE_PATH} | |
echo "youtube-dl --update" >> ${UPDATE_PATH} | |
chmod +x ${UPDATE_PATH} | |
# To uninstall youtube-dl run: | |
# sudo rm /usr/local/bin/youtube-dl /etc/cron.daily/update_youtube_dl | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For those having problems with
youtube-dl
, there's already a script to useyt-dlp
here:https://gist.github.com/jonath92/039e998b3d3f6ba4afd5d5c671eaedf1
Then right click Radio++ icon >
Configure
, go toPreferences
tab and chooseyt-dlp
as the CLI tool.Make sure the
Download directory
exists, I had to create the folderRadio
or else it would fail.