diff --git a/index.js b/index.js index 8e9f239..4b8692a 100644 --- a/index.js +++ b/index.js @@ -138,7 +138,8 @@ app.ws('/download/:id/:quality', async (ws, req) => { const videoWriteStream = fs.createWriteStream(`./output/${req.params.id}_video.mp4`) let videoTotal = videoFormat.content_length; - if (videoTotal > (1_048_576 * 150)) { + const whitelistedVideos = JSON.parse(fs.readFileSync('./whitelist.json')) + if (videoTotal > (1_048_576 * 150) && !whitelistedVideos.includes(req.params.id)) { ws.send('Is this content considered high risk? If so, please email me at admin@preservetube.com.'); ws.send('This video is too large, and unfortunately, Preservetube does not have unlimited storage.'); return ws.close() diff --git a/whitelist.json b/whitelist.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/whitelist.json @@ -0,0 +1 @@ +[] \ No newline at end of file