From 8480b4b2ffb980680dda0b888fe32b67be63eb0d Mon Sep 17 00:00:00 2001 From: istegner Date: Sun, 6 Mar 2022 06:28:14 +1000 Subject: [PATCH 1/2] [Docker] Switched to yt-dlp and python3 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 15e0b65..9157f6e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,10 +3,10 @@ FROM adoptopenjdk:8-jdk-hotspot as deps WORKDIR /EternalJukebox -RUN curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl \ +RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/youtube-dl \ && chmod a+rx /usr/local/bin/youtube-dl\ && apt-get update \ - && apt-get install ffmpeg gettext python -y \ + && apt-get install ffmpeg gettext python3 -y \ && apt-get clean \ && touch hikari.properties From 226feff11512918d3dfb83b5b0f320e9057cd431 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Volf?= Date: Tue, 6 Sep 2022 16:30:16 +0200 Subject: [PATCH 2/2] Download yt-dlp to correct location and support it on other platforms as well --- Dockerfile | 4 ++-- README.md | 8 ++++---- yt.bat | 2 +- yt.sh | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9157f6e..37b7f24 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,8 @@ FROM adoptopenjdk:8-jdk-hotspot as deps WORKDIR /EternalJukebox -RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/youtube-dl \ - && chmod a+rx /usr/local/bin/youtube-dl\ +RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp \ + && chmod a+rx /usr/local/bin/yt-dlp \ && apt-get update \ && apt-get install ffmpeg gettext python3 -y \ && apt-get clean \ diff --git a/README.md b/README.md index 728d9d6..d0ce04b 100644 --- a/README.md +++ b/README.md @@ -37,13 +37,13 @@ For Ubuntu or Debian-based distributions execute `sudo apt-get install default-j ##### Fedora and CentOS There is a tutorial for installing java on Fedora and CentOS at https://www.digitalocean.com/community/tutorials/how-to-install-java-on-centos-and-fedora -### Youtube-dl: +### Yt-dlp (a more up-to-date fork of Youtube-dl): ##### Windows -Download the .exe at https://yt-dl.org/latest/youtube-dl.exe and place it in `C:\Windows\`, or in another folder on the PATH. +Download the .exe at https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe and place it in `C:\Windows\`, or in another folder on the PATH. ##### Linux Use these commands in the terminal to install youtube-dl on Linux: -`sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl` -`sudo chmod a+rx /usr/local/bin/youtube-dl` +`sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp` +`sudo chmod a+rx /usr/local/bin/yt-dlp` ### ffmpeg: ##### Windows diff --git a/yt.bat b/yt.bat index 11648af..76cd7c1 100644 --- a/yt.bat +++ b/yt.bat @@ -1 +1 @@ -youtube-dl %1 -f best --audio-format %3 -x -o %2 --max-filesize 100m --no-playlist \ No newline at end of file +yt-dlp %1 -f best --audio-format %3 -x -o %2 --max-filesize 100m --no-playlist \ No newline at end of file diff --git a/yt.sh b/yt.sh index a6c7dc6..658d7fe 100644 --- a/yt.sh +++ b/yt.sh @@ -1 +1 @@ -youtube-dl $1 -f "best" --audio-format $3 -x -o $2 --max-filesize 100m --no-playlist +yt-dlp $1 -f "best" --audio-format $3 -x -o $2 --max-filesize 100m --no-playlist