ytdlp file limit update

This commit is contained in:
localhost 2023-09-15 18:55:10 +02:00
parent 63486b0723
commit c2f81583a3
1 changed files with 2 additions and 3 deletions

View File

@ -2,7 +2,7 @@ const child_process = require('child_process')
async function downloadVideo(url, ws) {
return new Promise((resolve, reject) => {
const child = child_process.spawn("../yt-dlp", ["--max-filesize=2G", url], {cwd: 'videos', shell: false})
const child = child_process.spawn("../yt-dlp", [url], {cwd: 'videos', shell: false})
child.stdout.on("data", data => {
const msg = data.toString().trim()
@ -14,8 +14,7 @@ async function downloadVideo(url, ws) {
child.on("close", async (code, signal) => {
if (code == 2) {
reject({
fail: true,
message: 'Video file is above 2GB. Consider selfhosting PreserveTube!'
fail: true
})
} else {
resolve({