Skip to content

Commit

Permalink
🐛 use yt-dlp instead of youtube-dl
Browse files Browse the repository at this point in the history
  • Loading branch information
tktcorporation committed Feb 19, 2023
1 parent 9d024c3 commit 4ffab0c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ serde = "1.0.152"

[dependencies.songbird]
version = "0.3.0"
features = ["builtin-queue"]
features = ["builtin-queue", "yt-dlp"]

[dependencies.serenity]
version = "0.11.5"
Expand Down
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ RUN apt-get update && \

RUN curl https://raw.githubusercontent.com/nektos/act/master/install.sh | bash

RUN curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/bin/youtube-dl && \
chmod a+rx /usr/bin/youtube-dl
# install yt-dlp
RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/bin/yt-dlp && \
chmod a+rx /usr/bin/yt-dlp

ARG ojosama_version=0.11.0

Expand Down Expand Up @@ -64,7 +65,7 @@ ENV LC_ALL=C.UTF-8

COPY --from=build-env /target/release/discord-tts-bot /bin/discord-tts-bot
COPY --from=build-env /sounds /sounds
COPY --from=build-env /usr/bin/youtube-dl /bin/youtube-dl
COPY --from=build-env /usr/bin/yt-dlp /bin/yt-dlp
COPY --from=build-env /usr/bin/ojosama /bin/ojosama

CMD [ "/bin/sh", "-c", "discord-tts-bot" ]
9 changes: 5 additions & 4 deletions docker/Dockerfile.music
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ RUN apt-get update && \

RUN curl https://raw.githubusercontent.com/nektos/act/master/install.sh | bash

RUN curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/bin/youtube-dl && \
chmod a+rx /usr/bin/youtube-dl
# install yt-dlp
RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/bin/yt-dlp && \
chmod a+rx /usr/bin/yt-dlp

ENV LC_ALL=C.UTF-8

Expand Down Expand Up @@ -50,14 +51,14 @@ RUN apt-get update && \
m4 \
ffmpeg \
curl \
python \
python3 \
&& apt-get -y clean \
&& rm -rf /var/lib/apt/lists/*

ENV LC_ALL=C.UTF-8

COPY --from=build-env /target/release/discord-tts-bot /bin/discord-tts-bot
COPY --from=build-env /sounds /sounds
COPY --from=build-env /usr/bin/youtube-dl /bin/youtube-dl
COPY --from=build-env /usr/bin/yt-dlp /bin/yt-dlp

CMD [ "/bin/sh", "-c", "discord-tts-bot" ]

0 comments on commit 4ffab0c

Please sign in to comment.