diff --git a/Dockerfile b/Dockerfile index 8d55212..2679055 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ WORKDIR /usr/src/preservetube/backend COPY . /usr/src/preservetube/backend RUN yarn -RUN wget https://github.com/yt-dlp/yt-dlp/releases/download/2023.07.06/yt-dlp -q +RUN wget https://github.com/yt-dlp/yt-dlp/releases/download/2023.09.24/yt-dlp -q RUN chmod +x yt-dlp CMD ["node", "index.js"] \ No newline at end of file diff --git a/utils/ytdlp.js b/utils/ytdlp.js index 34e11fc..4c1842c 100644 --- a/utils/ytdlp.js +++ b/utils/ytdlp.js @@ -3,7 +3,7 @@ const DOMPurify = require('isomorphic-dompurify') async function downloadVideo(url, ws) { return new Promise((resolve, reject) => { - const child = child_process.spawn("../yt-dlp", [url, ' -f 248+250/22/18/17'], {cwd: 'videos', shell: false}) + const child = child_process.spawn("../yt-dlp", [" -f 248+250/22/18/17", url], {cwd: 'videos', shell: false}) // https://github.com/yt-dlp/yt-dlp/blob/cc8d8441524ec3442d7c0d3f8f33f15b66aa06f3/README.md?plain=1#L1500 child.stdout.on("data", data => {