From c66f3e8403ab7dd02412cd5b9e28ccd0cf69294d Mon Sep 17 00:00:00 2001 From: Supositware Date: Mon, 20 Mar 2023 03:54:10 +0100 Subject: [PATCH] Removed useless file and update readme accordingly --- prereq.cjs | 29 ----------------------------- readme.md | 4 ++-- 2 files changed, 2 insertions(+), 31 deletions(-) delete mode 100644 prereq.cjs diff --git a/prereq.cjs b/prereq.cjs deleted file mode 100644 index 276116e6..00000000 --- a/prereq.cjs +++ /dev/null @@ -1,29 +0,0 @@ -const fs = require('node:fs'); -const https = require('node:https'); - -console.log('Downloading latest version of yt-dlp'); - -const downloadUrl = 'https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp'; -download(downloadUrl); - -function download(url) { - https.get(url, (res) => { - if (res.statusCode === 301 || res.statusCode === 302) { - console.log(`yt-dlp download url: ${res.headers.location}`); - return download(res.headers.location); - } - - const path = './bin/yt-dlp'; - const filePath = fs.createWriteStream(path); - res.pipe(filePath); - filePath.on('finish', () => { - filePath.close(); - fs.chmodSync('./bin/yt-dlp', '755'); - console.log('yt-dlp download finished.'); - }); - filePath.on('error', (err) => { - filePath.close(); - console.error(err.message); - }); - }); -} \ No newline at end of file diff --git a/readme.md b/readme.md index 941242e0..8d803e0b 100644 --- a/readme.md +++ b/readme.md @@ -11,8 +11,8 @@ These instructions will get you a copy of the project up and running on your loc You need to install the following -* ffmpeg (Optional but very recommanded: for yt-dlp to merge video/audio formats) -* yt-dlp ([a file can download it for you](prereq.cjs)) +* ffmpeg (Optional but very recommanded: for yt-dlp to merge video/audio formats and Handbrake to compress videos.) +* yt-dlp ([a file can download it for you](scripts/updateytdlp.js)) * HandBrakeCLI (For [download](commands/utility/download.js)) * gifsicle (For [vid2gif](commands/utility/vid2gif.js)) * gifki (For [vid2gif](commands/utility/vid2gif.js))