ytdlp file limit update
This commit is contained in:
parent
63486b0723
commit
c2f81583a3
|
@ -2,7 +2,7 @@ const child_process = require('child_process')
|
||||||
|
|
||||||
async function downloadVideo(url, ws) {
|
async function downloadVideo(url, ws) {
|
||||||
return new Promise((resolve, reject) => {
|
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 => {
|
child.stdout.on("data", data => {
|
||||||
const msg = data.toString().trim()
|
const msg = data.toString().trim()
|
||||||
|
@ -14,8 +14,7 @@ async function downloadVideo(url, ws) {
|
||||||
child.on("close", async (code, signal) => {
|
child.on("close", async (code, signal) => {
|
||||||
if (code == 2) {
|
if (code == 2) {
|
||||||
reject({
|
reject({
|
||||||
fail: true,
|
fail: true
|
||||||
message: 'Video file is above 2GB. Consider selfhosting PreserveTube!'
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
resolve({
|
resolve({
|
||||||
|
|
Loading…
Reference in New Issue