From 17cd735d1c201a2009e26773b8b07c2c241af1d7 Mon Sep 17 00:00:00 2001 From: eulaly Date: Sat, 16 Aug 2025 21:15:12 -0400 Subject: [PATCH] added entrypoint to create yt-dlp.conf on container run if not exist --- default-yt-dlp.conf | 11 +++++++++++ dockerfile | 5 ++++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 default-yt-dlp.conf diff --git a/default-yt-dlp.conf b/default-yt-dlp.conf new file mode 100644 index 0000000..efb7c69 --- /dev/null +++ b/default-yt-dlp.conf @@ -0,0 +1,11 @@ +# yt-dlp config file (yt-dlp.conf or .config/yt-dlp/config) +--simulate +-f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" +--embed-chapters +--embed-info-json +--write-playlist-metafiles +#--paths "{"home":"./downloads"}" +--download-archive "/config/archive.txt" +--restrict-filenames +--output "/downloads/%(uploader)s/%(playlist_title)s/%(playlist_index)s%(playlist_index& - )s%(title)s.%(ext)s" +# --split-chapters \ No newline at end of file diff --git a/dockerfile b/dockerfile index b8d769e..5a41345 100644 --- a/dockerfile +++ b/dockerfile @@ -5,6 +5,9 @@ RUN apk update && \ apk add --no-cache build-base ffmpeg && \ rm -rf /var/cache/apk/* COPY requirements.txt requirements.txt -RUN python3 -m pip install --no-cache-dir -r requirements.txt +RUN python3 -m pip install --no-cache-dir -r requirements.txt COPY youdis.py youdis.py +COPY default-yt-dlp.conf /app/default-yt-dlp.conf +COPY create-ytdlp-conf.sh /app/create-ytdlp-conf.sh +ENTRYPOINT ["/app/create-ytdlp-conf.sh"] CMD ["python3", "youdis.py"] \ No newline at end of file