adding bypass to the file size limit
This commit is contained in:
parent
dade8017f2
commit
04785be90e
3
index.js
3
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()
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
[]
|
Loading…
Reference in New Issue