From f2ec5cd9c8a54e75f24e8a6f10ad31c2387ff168 Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Sat, 13 Aug 2016 22:33:30 +0200 Subject: [PATCH] Replace the shipped youtube-dl with the latest version at build time. This is a temporary hack to get YouTube videos back working since many of them no longer resolve properly through youtube-dl. --- setup.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 4b3dc3e..6f0de82 100644 --- a/setup.sh +++ b/setup.sh @@ -33,8 +33,11 @@ rm ./ts3client.run npm_config_wcjs_runtime="node" npm_config_wcjs_runtime_version="$(node --version | tr -d 'v')" \ npm link --unsafe-perm ~app/src -# Fix for youtube-dl -chmod a+rx "$(dirname "$(readlink -f "$(which ts3bot)")")/node_modules/youtube-dl/bin/youtube-dl" +# Replace the shipped youtube-dl with the latest version (this is a hack that will hopefully be fixed soon!) +wget -O/usr/local/bin/youtube-dl "https://yt-dl.org/downloads/latest/youtube-dl" +rm -f "$(dirname "$(readlink -f "$(which ts3bot)")")/node_modules/youtube-dl/bin/youtube-dl" +ln -sf "/usr/local/bin/youtube-dl" "$(dirname "$(readlink -f "$(which ts3bot)")")/node_modules/youtube-dl/bin/youtube-dl" +chmod a+rx "/usr/local/bin/youtube-dl" # Clean up APT apt-get autoremove -y --purge wget cmake cmake-data