From 11112c7537c2a158aeb0a23573233943419278ec Mon Sep 17 00:00:00 2001 From: HitomaruKonpaku Date: Sat, 12 Oct 2024 08:58:24 +0700 Subject: [PATCH] Allow yt-dlp config & cookies --- docker/Dockerfile | 9 ++++++++- example/docker-compose.yaml | 2 ++ example/yt-dlp.conf | 7 +++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 example/yt-dlp.conf diff --git a/docker/Dockerfile b/docker/Dockerfile index 55235a2..7ac7649 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -29,7 +29,14 @@ ENV NODE_ENV=production VOLUME /app/logs VOLUME /app/download -RUN apk add --no-cache ffmpeg yt-dlp +RUN apk add --no-cache curl yt-dlp + +# Remove current yt-dlp +RUN rm -rf /usr/bin/yt-dlp + +# Install latest yt-dlp +RUN curl -L -o /usr/local/bin/yt-dlp https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp +RUN chmod a+rx /usr/local/bin/yt-dlp COPY --from=dependencies /app/node_modules ./node_modules COPY --from=builder /app/dist ./dist diff --git a/example/docker-compose.yaml b/example/docker-compose.yaml index 91d849c..ca82ddc 100644 --- a/example/docker-compose.yaml +++ b/example/docker-compose.yaml @@ -7,6 +7,8 @@ services: environment: LOG_LEVEL: verbose # debug/verbose/info volumes: + - ./yt-dlp.conf:/etc/yt-dlp.conf + # - ./cookies.txt:/cookies.txt # provide cookies to access membership vod - ./config.yaml:/app/config.yaml - ./logs:/app/logs - ./download:/app/download diff --git a/example/yt-dlp.conf b/example/yt-dlp.conf new file mode 100644 index 0000000..4f4fd20 --- /dev/null +++ b/example/yt-dlp.conf @@ -0,0 +1,7 @@ +--verbose + +--cookies "/cookies.txt" + +--write-info-json +--write-thumbnail +--embed-thumbnail