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 c2c0bf5 commit f42dd75
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Expand Up @@ -177,7 +177,7 @@ jobs:
m4 \
ffmpeg \
curl \
python-is-python3 \
python3 \
git
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/bin/youtube-dl && \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Expand Up @@ -99,7 +99,7 @@ jobs:
- name: Install musl tools
if: matrix.target == 'x86_64-unknown-linux-musl'
# Install libssl-dev for openssl-sys
run: sudo apt-get install -y musl-tools libssl-dev libopus-dev build-essential libssl-dev pkg-config autoconf automake libtool m4 ffmpeg curl python
run: sudo apt-get install -y musl-tools libssl-dev libopus-dev build-essential libssl-dev pkg-config autoconf automake libtool m4 ffmpeg curl python3

- name: Build | Build
uses: actions-rs/cargo@v1
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
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
11 changes: 6 additions & 5 deletions Dockerfile
Expand Up @@ -12,13 +12,14 @@ RUN apt-get update && \
m4 \
ffmpeg \
curl \
python \
python3 \
git

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 @@ -56,15 +57,15 @@ 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
COPY --from=build-env /usr/bin/ojosama /bin/ojosama

CMD [ "/bin/sh", "-c", "discord-tts-bot" ]
11 changes: 6 additions & 5 deletions docker/Dockerfile.music
Expand Up @@ -12,13 +12,14 @@ RUN apt-get update && \
m4 \
ffmpeg \
curl \
python \
python3 \
git

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 f42dd75

Please sign in to comment.